Quantcast
Channel: RM COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 207

Correct use of RMNet Command "NetFree" and clearing a pointer

$
0
0

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!


Viewing all articles
Browse latest Browse all 207

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>