I have a question about the proper use of RMNet command "NetFree", please.
I'm working on a program that uses a pointer.
01 json-string pic x(80000).
01 PASS-1-DOCUMENT usage pointer.
01 PASS-2-DOCUMENT usage pointer.
The program uses XML Extensions command:
XML EXPORT TEXT
JSON-STRING
PASS-1-DOCUMENT
"JSON-STRING"
"json2xml.xsl"
XML TRANSFORM TEXT
PASS-1-DOCUMENT
"json2xml2.xsl"
PASS-2-DOCUMENT
The description of the "NetFree" command from the book states:
A pointer given by RMNet that caller wishes to free. Use this function only for
pointers that have been given to caller by RMNet.
In this case, RMNet DID NOT set the pointer. Instead, the application set the pointer.
My goal is to keep the program "clean" and not create a memory leak.
My questions:
Should I use command:
CALL "NetFree" USING PASS-1-DOCUMENT
to free the pointer?
If not, is there another command I should use to clear the pointer?
All advice, comments, and suggestions will be welcome.
Thanks!