The RTVOUTQA command allows you to extract one or more parameters
from an existing output queue into a CL program. This can be used
for various functions in working with output queues. The command
also allows return values for the current status information such as
how many files exist, what writer is assigned, etc.
RTVOUTQA uses the API QSPROUTQ to access the information.
A typical use of the command is to extract the DSPDTA parameter to
determine if the 'display data' function is allowed:
DCL &DSPDTA *CHAR LEN(4)
.
.
RTVOUTQA OUTQ(QPRINT) DSPDTA(&DSPDTA)
IF (&DSPDTA *EQ '*YES') DO .....
The command parameters may be prompted for with the command. The
value in the parenthesis for each parameter describes the length and
type of field to be specified in your CL program to receive the
parameter.
RTVOUTQA Command parameters *CMD
---------------------------
OUTQ The qualified output queue name. The library
defaults to *LIBL.
RTNLIB An optional return variable that will contain the
library name where the output queue was found. The
value may be helpful if the output queue is accessed
without a specific library name. If specified, the
variable must be declared as *CHAR LEN(10).
DSPDTA An optional return variable that will contain the
Display data value. The value will be *YES, *NO, or
*OWNER. If specified, the variable must be declared
as *CHAR LEN(7).
JOBSEP An optional return variable that will contain the
value of the Job separator parameter. A value of
0-9 or *MSG will be returned. If specified, the
variable must be declared as *CHAR LEN(4).
OPRCTL An optional return variable that will contain the
value of the Operator control parameter. A value of
*YES or *NO will be returned. If specified, the
variable must be declared as *CHAR LEN(4).
SEQ An optional return variable that will contain the
value of the Sequence parameter. A value of *FIFO
or *JOBNBR will be returned. If specified, the
variable must be declared as *CHAR LEN(4).
AUTCHK An optional return variable that will contain the
value of the Authority check parameter. A value of
*OWNER or *DTAAUT will be returned. If specified,
the variable must be declared as *CHAR LEN(7).
DTAQ An optional return variable that will contain the
value of the Data queue parameter. If specified,
the variable must be declared as *CHAR LEN(10).
DTAQL An optional return variable that will contain the
library where the data queue is located. If
specified, the variable must be declared as *CHAR
LEN(10).
OWNER An optional return variable that will contain the
owner name of the output queue. If specified, the
variable must be declared as *CHAR LEN(10).
SPLFASP An optional return variable that will contain the ID
of the ASP used for the spooled files. If
specified, the variable must be declared as *CHAR
LEN(3).
NBRFILES An optional return variable that will contain the
number of files on the output queue. If specified,
the variable must be declared as *DEC LEN(9 0).
QSTATUS An optional return variable that will contain the
current status of the output queue. The value
returned will be RELEASED or HELD. If specified,
the variable must be declared as *CHAR LEN(10).
WTRNAM An optional return variable that will contain the
name of the writer assigned to the queue. If no
writer is assigned, the value returned is blank. If
specified, the variable must be declared as *CHAR
LEN(10).
WTRUSR An optional return variable that will contain the
name of the user profile running the writer job. If
no writer is assigned, the value returned is blank.
If specified, the variable must be declared as *CHAR
LEN(10).
WTRNBR An optional return variable that will contain the
job number of the writer job. If no writer is
assigned, the value returned is blank. If
specified, the variable must be declared as *CHAR
LEN(6).
WTRSTS An optional return variable that will contain the
status of the writer. If no writer is assigned, the
value returned is blank. The value returned will be
STR, END, JOBQ, HLD, or MSGQW. If specified, the
variable must be declared as *CHAR LEN(10).
PRTDEV An optional return variable that will contain the
print device assigned to the writer. If no writer
is assigned, the value is blank. If specified, the
variable must be declared as *CHAR LEN(10).
MSGQ An optional return variable that will contain the
message queue assigned to the writer. If specified,
the variable must be declared as *CHAR LEN(10).
MSGQL An optional return variable that will contain the
library where the message queue assigned to the
writer is located. If specified, the variable must
be declared as *CHAR LEN(10).
RMTSYSNAMT An optional return variable that will contain a
value for a Remote System Name type. The value
works in conjunction with the RMTSYSNAME return
variable. The values returned are:
0 No remote system name specified
1 Output is routed to the system using pass-through
2 The name of the remote system
3 Internet address
If specified, the variable must be declared as *CHAR
LEN(1).
RMTSYSNAME An optional return variable that will contain a
value based on the Remote System Name Type. The
values returned are:
If 0 Blank
If 1 Blank
If 2 System name
If 3 Internet address (15 bytes)
If specified, the variable must be declared as *CHAR
LEN(255).
NBRWTRS An optional return variable that will contain the
number of writers assigned to the output queue. If
specified, the variable must be declared as *DEC
LEN(5 0).
CNNTYPE An optional return variable that will contain the
connection type. The value returned will be *NONE,
*SNA, *IP, *IPX, or *USRDFN. If specified, the
variable must be declared as *CHAR LEN(10).
DESTTYPE An optional return variable that will contain the
destination type. The value returned will be *NONE,
*OS400, *OS400V2, *S390, *PSF2, *NETWARE3, *NETWARE4
(*NDS), or *OTHER. If specified, the variable must
be declared as *CHAR LEN(10).
TRANSFORM An optional return variable that will contain the
Host print transform option. The value returned
will be *YES or *NO. If specified, the variable
must be declared as *CHAR LEN(4).
MFRTYPMDL An optional return variable that will contain the
Manufacturer Type and Model. If specified, the
variable must be declared as *CHAR LEN(17).
WSCST An optional return variable that will contain the
Workstation customizing object. If specified, the
variable must be declared as *CHAR LEN(10).
WSCSTL An optional return variable that will contain the
Workstation customizing object library. If
specified, the variable must be declared as *CHAR
LEN(10).
IMGCFG An optional return variable that will contain the
Image configuration. If specified, the variable
must be declared as *CHAR LEN(10).
CLASS An optional return variable that will contain the
VM/VMS class. If specified, the variable must be
declared as *CHAR LEN(1).
FCB An optional return variable that will contain the
Forms Control buffer. The value returned will be
*NONE, *USRDTA, *PRTF, or the name of the FCB. If
specified, the variable must be declared as *CHAR
LEN(10).
SEPPAGE An optional return variable that will contain the
Separator Page option. The value returned will be
*YES or *NO. If specified, the variable must be
declared as *CHAR LEN(4).
RMTPRTQ An optional return variable that will contain the
value of the remote printer output queue. If
specified, the variable must be declared as *CHAR
LEN(128).
TEXT An optional return variable that will contain the
text description of the output queue. If specified,
the variable must be declared as *CHAR LEN(50).
RMTPRTQL An optional return variable that will contain the
long name of the remote output queue. If specified,
the variable must be declared as *CHAR LEN(255).
Prerequisites
-------------
The following TAA Tools must be on your system:
EDTVAR Edit variable
RTVWTRSTS Retrieve writer status
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ----- --------- ---------- -----------
RTVOUTQA *CMD TAASPLE QATTCMD
TAASPLEC *PGM CLP TAASPLEC QATTCL
|