RTVSPLFID RETRIEVE SPOOLED FILE ID TAASPLO |
The Retrieve Spooled File ID command allows you to return the ID
information about a spooled file to a CL program.
A typical function would be to determine the spooled file number of
the last version of a specific spooled file.
DCL &RTNSPLNB2 *CHAR LEN(6)
.
RTVSPLFID SPLF(xxx) SPLNBR(*LAST) +
RTNSPLNBR(&RTNSPLNB2)
One or more return values may be specified. RTVSPLFID uses the API
QUSRSPLA.
The internal job ID and spool ID values can also be returned for use
with APIs.
Accessing the spooled file number from the Feedback area
--------------------------------------------------------
An alternative solution is to use the information supplied in the
file feedback area to access the assigned spooled file number. When
you open a spooled file, the system assigns the spooled file number
and it is placed in the feedback area.
A good choice when you want this technique is to use the TAA Tool
FILEFDBCK to provide externally described data for the feedback area.
Different files are supplied for data base, workstation, and printer.
Each file is intended to be used for an externally described data
structure. To access the printer feedback, you want the TAA file
TAABCKPP.
For example, if you wanted to access the spooled file number for the
QPRINT file, you would do the following:
FQPRINT O F 132 OF PRINTER KINFDS FDBCKP
.
I* File feedback area defined by TAA FILEFDBCK tool
IFDBCKP E DSTAABCKPP
.
C* The name of the spooled file number assigned is FPSNBR.
C* It is defined as *CHAR LEN(4).
C* You could move it with the following statement
C MOVE FPSNBR XXXXX
Command parameters *CMD
------------------
SPLF The spooled file name to be retrieved.
JOB The qualified job name. An * is the default and
means the current job.
SPLNBR The spooled file number. *ONLY is the default.
*LAST may be specified or a specific spooled file
number.
RTNUSER The return user name. It must be specified as *CHAR
LEN(10).
RTNJOBNBR The return job number. It must be specified as
*CHAR LEN(6).
RTNSPLNBR The return spooled file number. It must be
specified as *CHAR LEN(4).
If the spooled file number is greater than 9999, 0
will be returned. Use RTNSPLNB2 instead.
RTNSPLNB2 The return spooled file number. It must be
specified as *CHAR LEN(6).
INTJOBID The return internal job ID. It must be specified as
*CHAR LEN(16).
INTSPLFID The return spooled file ID. It must be specified as
*CHAR LEN(16).
Restrictions
------------
Because the command returns variables, it can only be executed in a
CL program.
Prerequisites
-------------
None.
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
RTVSPLFID *CMD TAASPLO QATTCMD
TAASPLOC *PGM CLP TAASPLOC QATTCL
|
Added to TAA Productivity tools April 1, 1995