It doesn't look like there is an "env" object. It is a string in the
"string" object, not an actual object.

Bradley V. Stone
MAILTOOL Benefit #1 <>: Command and
ILE Interfaces available which means easily sending email from your

On Thu, Feb 7, 2019 at 2:13 PM Jay Vaughn <jeffersonvaughn@xxxxxxxxx> wrote:

i have the following code and trying to get this up and running (from a
working copy at a prior shop)... but yajl_get_string is returning
nothing... what should I look for?

EVAL jsoninp
1 '{"length":"121","string":"{\"env\":\"dev\",\"command\":\"GET'
61 '_LOAN_BORROWER\",\"payload\":[{\"loanNumber\":0000002428}]}"'
121 '} '
181 ' '

// load jSON object
g_docNode = yajl_buf_load_tree(%addr(jsonINP) + 2

return g_errMsg;

g_node = YAJL_object_find(g_docNode: 'env');
if yajl_is_false(g_node);
g_errMsg = 'Error - env Not Found In Input';
return g_errMsg;

g_environment = yajl_get_string(g_node);

Again, everything runs successfully until the last statement (and this used
to be working code on another box)... g_environment ends up with blanks...
what am I overlooking?

This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives

Please contact support@xxxxxxxxxxxx for any subscription related

Help support by shopping at with our affiliate

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.