Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column or global variable xxx not found. #92

Open
wimjongman opened this issue Nov 25, 2024 · 6 comments
Open

Column or global variable xxx not found. #92

wimjongman opened this issue Nov 25, 2024 · 6 comments

Comments

@wimjongman
Copy link
Contributor

I adapted and executed some of the nested SQL examples but I get the message

  Column or global variable PPAPPC not found.

PPAPPC is a field in the row.

   sql = 'Select * from omsxmp.omapp';
   appHandler  = json_sqlOpen(sql);

   // Now iterate on each row in the resultset
   appRow = json_sqlFetchNext(appHandler);
   DoW (appRow <> *NULL);
      // Note: the SQL can be a template, we fill with values from a json row
      sql = 'Select * from omsxmp.ompdl where dlappc = $ppappc' ;
      envArrary  = json_sqlResultSet(sql: 1 : 9999 : 0 : appRow);
      // Append the row to the end of the result array.
      json_MoveObjectInto (appRow   : 'environments' : envArrary );
      json_ArrayPush (resultArray : appRow );
      appRow = json_sqlFetchNext(appHandler) ;
   EndDo;

image

@NielsLiisberg
Copy link
Collaborator

NielsLiisberg commented Nov 25, 2024 via email

@NielsLiisberg
Copy link
Collaborator

Test case and workaround is created here:

https://github.com/sitemule/noxDB/blob/master/test/issue92.rpgle

@wimjongman
Copy link
Contributor Author

wimjongman commented Nov 26, 2024 via email

@NielsLiisberg
Copy link
Collaborator

NielsLiisberg commented Nov 26, 2024 via email

@wimjongman
Copy link
Contributor Author

I will play around with setDelimeters* and report back.

I am running in 37 so I'm not sure why $ falls of the wagon. Should JSONXML *SRVPGM be in 37 (or any except 65535)?

@NielsLiisberg
Copy link
Collaborator

NielsLiisberg commented Nov 26, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants