I am dipping my toe into the z/OS JSON parser (form C++). I am using 
SYS1.SIEAHDRV.H(HWTJIC) as a guide. I make it through the hwtjinit() with a 
zero return code but my next call, to hwtjpars(), gives me a return code 1025 
(Specified JSON string address is less than or equal to zero).

I thought okay, I am getting bit by a high-order list terminator bit, so I AND 
the address with 0x7fffffff and still no joy. Here's the code

char* sanitizedparm = (char*)((int)parm & 0x7fffffff);          // Get rid of 
any high-order x'80'

M::Verbose("Address of JSON text, %08X; Length %d, data '%s'", sanitizedparm, 
parmLen, sanitizedparm);

hwtjpars(&return_code,
        parser_instance,
        sanitizedparm, /* JSON text string address(input) */
        parmLen, /* JSON text string length (input) */
        &diag_area);

That "M::Verbose" puts out a diagnostic message that is exactly as I would 
expect:
Address of JSON text, 1B1500D9; Length 17, data '{"verbose": true}' 

Just for a lark I tried passing a static string in the source code and get the 
same error. 

Anyone have any experience with this? Anyone have any ideas?

Charles

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to