FREE FREE AN RPG PROGRAM USING CL TAACLPP |
The FREE command has a specialized function.
If you have used an RPG program that does not use any files and does
not end with LR on, the program is still active. It can be cleaned
up by:
** If the program is written to accept an 'end of job' parameter,
you can call it with the unique parameter.
** Use the RPG FREE operation code. This makes the program
inactive, but does not close any files.
** Use the CL command RCLRSC. By default, this cleans up all
active programs that were called from your program or programs
that were lower than your program in the program stack. If
files are open from these programs or were left open from
programs that were lower in the program stack, they are also
closed.
Note what RCLRSC does not do is clean up programs or files
that were activated higher in the program stack than your
current program.
The FREE command described in this tool allows you to operate from CL
and close a specific RPG program. It is a more granular solution
than RCLRSC in that it only cleans up a specific program.
You should avoid the use of FREE if the program has open files.
A typical command is entered as:
FREE PGM(xxx)
If the program is not active, no error will occur.
If the program does not exist, an error will occur.
The RPG FREE command does not allow the use of *LIBL. The function
is performed by using RTVOBJD to determine the actual library used.
Command parameters *CMD
------------------
PGM The qualified program name to be freed. The library
qualifier defaults to *LIBL.
Restrictions
-------------
Avoid the use of FREE, if the program has active files.
Prerequisites
-------------
The following TAA Tools must be on your system:
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
FREE *CMD TAACLPP QATTCMD
TAACLPPC *PGM CLP TAACLPPC QATTCL
TAACLPPR *PGM RPG TAACLPPR QATTRPG
|
Added to TAA Productivity tools April 1, 1995