RTVSPLFID2 RETRIEVE SPOOLED FILE ID 2 TAASPOE |
The Retrieve Spooled File ID 2 command is intended for the situation
where you need to know the spooled file name and number of the last
spooled file in a job. The return variables may then be used with
commands such as RTVSPLFA to determine other attributes or DUPSPLF to
duplicate the spooled file.
RTVSPLFID differs from RTVSPLFID2 in that you must know the spooled
file name.
A typical series of commands would be:
DCL &RTNSPLF *CHAR LEN(10)
DCL &RTNSPLNBR *CHAR LEN(6)
DCL &RTNJOB *CHAR LEN(10)
DCL &RTNUSER *CHAR LEN(10)
DCL &RTNJOBNBR *CHAR LEN(6)
.
/* After the output of some spooled file */
RTVSPLFID2 RTNSPLF(&RTNSPLF) RTNSPLNBR(&RTNSPLNBR) +
RTNJOB(&RTNJOB) RTNUSER(&RTNUSER) +
RTNJOBNBR(&RTNJOBNBR)
RTVSPLFID2 escape messages you can monitor for
----------------------------------------------
TAA9884 No spooled files exist for the job.
TAA9885 No spooled files exist in the categories that
are bypassed such as *FINISHED, *HELD, and *SAVE
TAA9886 More than the maximum of 160,000 spooled files
exist for the job
Escape messages from based on functions will be re-sent.
Command parameters *CMD
------------------
RTNSPLF The name of the last spooled file in the job. See
the parameters HELD and SAVE that may modify the
definition of 'last'. This is an optional return
variable that if used must be specified as *CHAR
LEN(10).
RTNSPLNBR The number of the last spooled file in the job.
This is an optional return variable that if used
must be specified as *CHAR LEN(6).
RTNJOB The job name of the current job. This is an
optional return variable that if used must be
specified as *CHAR LEN(10).
RTNUSER The user of the current job. This is an optional
return variable that if used must be specified as
*CHAR LEN(10).
RTNJOBNBR The job number of the current job. This is an
optional return variable that if used must be
specified as *CHAR LEN(6).
HELD Whether to bypass the spooled files that are in a
*HELD status. *BYPASS is the default. *RETURN may
be specified to consider the spooled files that are
in a *HELD status.
SAVE Whether to bypass the spooled files that are in a
*SAVE status. *BYPASS is the default. *RETURN may
be specified to consider the spooled files that are
in a *SAVE status.
Restrictions
------------
Because the command returns variables it may only be used in a CL
program.
Prerequisites
-------------
The following TAA Tools must be on your system:
CRTUSRSPC Create user space
SNDESCINF Send escape information
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
RTVSPLFID2 *CMD TAASPOE QATTCMD
TAASPOEC *PGM CLP TAASPOEC QATTCL
|
Added to TAA Productivity tools January 1, 2007