I am guessing that the problem is that the program is XPLINK and is passing a 
64-bit parameter to hwtjpars and the first word is of course zero.

What do I have to specify for linkage? I am still learning my way through 
XPLINK. 

The JSON functions were declared extern "OS". I just tried extern OS_UPSTACK 
with no change. 

Is this impossible to solve easily? Are my local variables likely to be above 
the bar, and impossible to pass to the JSON services? Does the JSON parse not 
support 64-bit programs? That seems odd.

Help me out here <g>

Charles

On Thu, 31 Jul 2025 16:30:42 -0500, Charles Mills <[email protected]> wrote:

>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 [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to