There is a requirement to send data from Mainframe to Server using JSON.
We have built a JSON data from mainframe and it looks like this - "m_last2_nm": "", but it has to look like this -"m_last2_nm": null,
Instead of "", we need to have null there.
COBOL declaration is -
05 X-LAST1-NM-LEN PIC S9999 COMP-5 SYNC.
05 X-LAST1-NM PIC N(100) USAGE NATIONAL.
I am not sure how to initialize a non-DB2 variable as NULL in mainframe. If Host variable, we can have indicator fields, and using that we can set it to -1.
But for non-DB2 variable, I am unable to get this value set as NULL. Not sure if that is really possible... Please forgive me if this is a naive question.