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



I'm working with our web team who is sending me a JSON document. After a simple proof of concept many months ago and test documents, I received the first real output from the web process.

After changing my DS to look more like the output of YAJLGEN, I'm getting this error message out of YAJLINTO

1002: lexical error: invalid char in json text.█
The parser for the DATA-INTO operation detected error code 1002.

The unprintable character displays on a green screen as a question mark. I don't see any unusual characters when viewing the JSON data using Run SQL Scripts or in debug.

Any suggestions about how to fix this? I tried filtering the JSON hoping to make sure that there's no unprintable characters under x'40'.


wrkContent = %ScanRpl(x'000102030405060708090A0B0C0D0E0F' +
'101112131415161718191A1B1C1D1E1F' +
'202122332425262728292A2B2C2D2E2F' +
'303132333435363738393A3B3C3D3E3F':
' ':wrkContent);

We're on 7.3. The web process inserts a record into a db2 file with a CLOB column. This is what the column definition looks like:

Transaction_Content FOR WTCONTENT CLOB ALLOCATE(100) CCSID 37
NOT NULL DEFAULT '' )

This is the JSOSN code from the program:

EXEC SQL DECLARE CWE100R0 CURSOR FOR
SELECT a.wtRecID, a.wtWebID, a.wtSts, a.wtStsDte, a.wtContent
FROM cvWebTx A

EXEC SQL FETCH NEXT FROM CWE100R0 INTO
:wtRecID, :wtWebID, :wtSts, :wtStsDte, :wrkContent;

Dcl-s wrkContent SQLTYPE(Clob:128000);

// Extract data from JSON document (cvWebTX.wtContent)
Data-Into txJSONDoc
%Data(wrkContent:'AllowExtra=Yes ' +
'doc=string ' +
'AllowMissing=Yes ' +
'Case=Convert ' +
'CountPrefix=Count_')
%Parser('YAJLINTO':'{"value_null":" "}');


Thanks in Advance
Jack


[CFNC]

This email, including any documents, files, or previous email messages attached to it, has been sent from an email account of College Foundation Inc., (CFI) and may contain confidential, proprietary, or legally privileged information belonging to CFI. If you are not the intended recipient, any dissemination, distribution, or copying of this email or its attachments is strictly prohibited. If you have received this email in error, please immediately notify the sender by email and destroy the original email and any attachments.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.