[stackoverflow] [progress Openedge Abl] Openedge Abl Reserved Keyword As Temp-table Field...

Status
Not open for further replies.
A

AlisaDu

Guest
I am stuck with the following situation:

My method receives a response from external REST API call. The JSON response structure is as below:

{
"members": [
{
"email_address": "random@address.org",
"status": "randomstatus"
},
...etc...
]}


I am reading this to temp-table with READ-JSON (Inferring ABL schema from JSON data) and try to process the temp-table. And this is where I am stuck: when I am trying to put together a query that contains temp-table field "status", the error is raised. Example:

hQuery:QUERY-PREPARE('FOR EACH ' + httSubscriber:NAME + ' WHERE ' + hBuffer:BUFFER-FIELD(iStatus):NAME + ' = "randomstatus"').


gives:


**Unable to understand after -- "members WHERE".(247)

I have tried referencing directly by name as well, same result.

Probably the "status" is a reserved keyword in ABL. Might that be the case? And how can I get over this issue to reference that "status" field?

Unfortunately the format and key names of JSON response are not under my control and I have to work with that.

Continue reading...
 
Status
Not open for further replies.
Top