Hi Tom,
I have got the following queries. Could you please advise.
Apologies if my queries are naive.
1) Do I need to include any copy member for accessing these variables in the program ?
HWTJ_WARNING, HWTJ-RETURN-CODE, HWTJ-PARSERHANDLE, HWTJ-DIAG-AREA, HWTJ-HANDLE etc
2) At some places, i also get chinese characters in the input UTF-8 JSON string, how will i convert this to EBCDIC format? please advise.
3) While calling HWTJSRCH, what values to be passed to these parameters - ObjectHandle, StartingHandle
4) While calling HWTJGAEN, what is the significance of this statement and where this index is used - SET REQUEST-ARRAY-INDEX TO 1
5) In PROCESS-REQUEST-INFO para, there is call like this (CALL 'findstring' ). Please advise if i need to use this statement as is, since i dint get any clue what is 'findstring'.
6) Is HWTJTERM mandatory?
7) Let say I have a structure like this, and lets say, i have searched m_Address pointer using HWTJSRCH and called "HWTJGNUE", "HWTJGAEN" modules.
and did a look up for the string m_address-id and get the value 1155. Then in the same way. let me read country and state.
Now how will i look up the another address-id? Will the parse handle navigate to the successive strings one by one? Please advise.
"m_Address": [
{
"m_address-id": 1155,
"m_cntry_cd": "USA",
"m_state": "IN"
}
"m_address-id": 1144,
"m_cntry_cd": "USA",
"m_state": "CA"
}
]
8) In the same way, like address, i do have phone and mail details in different arrays. For these, i will search from the root variable like we did for m_Address array? Please advise.
The flow i considered for m_address is :
HWTJINIT
HWTJPARSE
HWTJSRCH (MOVE 'm_Address' TO WS-SRCH-STR MOVE X'00000000' TO HWTJ-HANDLE )
HWTJGNUE (this will get the num of entries... for eg : 2 considering the above example)
HWTJGAEN (loop this based on num of entries)
MOVE 'm_bldg_nb' TO WS-SRCH-STR
CALL 'findstring' USING
end loop
Harry01