× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 2018-11-01 10:57 AM, Gerald Magnuson wrote:
it appears that when the parser hits a column that is empty, I get
RNX0358, condition 12...
and by empty I mean, "column-name":"" ...
like "userId":"",

my data-into statement:
DATA-INTO articles %Data( retdata:
'case=any countprefix=count_')
%Parser('GEMLIB/JSONPARSE');


There's a bug in the reportString procedure in the JSONPARSE sample program. To fix it, add the line marked "-->" just before the return statement.

if parseCtrl.numberParsed < parseCtrl.maxLen;
tokenPointer += CHAR_LEN;
if dataChar = QUOTE;
// in case we encounter an empty string we search for
// the quote right away
tokenPointer -= CHAR_LEN;
parseCtrl.curToken.startPointer = tokenPointer;
parseCtrl.curToken.lengthInt = 0;
parseCtrl.numberParsed += CHAR_LEN;
reportNameVal(parseCtrl);
--> parseCtrl.parserPointer = tokenPointer + (2 * CHAR_LEN);
return;
endif;

Since library QOAR is an IBM product library, it would be best to copy the source to another library and compile the program into another library.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 by midrange.com 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.