1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

OpenEdge ABL reserved keyword as temp-table field name (inferred from JSON data)

Discussão em 'StackOverflow' iniciado por fdantas, Julho 31, 2017.

  1. fdantas

    fdantas Administrator Moderador

    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...

Compartilhe esta Página