Hello!
I have begun to investigate the use of JSON GENERATE to solve for an API use case.
Assuming that I cannot change the NODBCS compiling option, is there any way to utilize the JSON GENERATE statement? Ideally, I'd be able to create a JSON payload to be sent via zConnect (2.0). (I recognize that's what zconnect is for already).
Following the examples given from the documentation, anytime I try to establish a national (PIC N(100)) or UTF-8 (PIC U(100)) field, I receive an error at compile time re: the NODBCS.
IGYSC1105-E The "NODBCS" option was in effect but the program contained national data. Execution results are unpredictable.
For example, if I use this in my system:
*
01 payload.
02 data-a PIC X.
02 data-b PIC X.
*
01 myJSONpayload PIC X(50).
01 myJSONpayload-len PIC S9(04) COMP.
*
MOVE 'Y' TO data-a
MOVE 'N' TO data-b
JSON GENERATE myJSONpayload FROM payload
COUNT myJSONpayload-len
END-JSON
DISPLAY 'DJWPEP : ' myJSONpayload (1:myJSONpayload-len)
Display: DJWPEP : # /`%?/ # / / / / / + ''
Local log (just first 30 bytes)

The same (but 50 bytes) after pushing into the (outbound) request and logged there:
"#?ø/`%?/À??#?À/È/\u0005/???ß???À/È/\u0005Â???+?''"
I am not sure if that makes sense, and happy to follow-up.
Thanks for any help.
------------------------------
Derek Williamson
------------------------------