![[About]](r:\html\lsrxabout.gif)
![[Toc]](r:\html\lsrxtoc.gif)
0.9b (c) 1995 Peter Childs
The function enumerates print queues available.
Syntax
MyRc = RxSplEnumQueue(ComputerName, RxStem)
Parameters
ComputerName The name of the computer to query. Use '' for a local
computer
The returned parameter values are:
MyRc Return code from the function call. It must be 0 otherwise
all other returned values are invalid
'RxStem' A REXX variable which is divided into:
o RxStem.count
The number of printer queues available. If 0, the following variables
are invalid
o RxStem.n.Name
The print queue name for entry n. (n = 1 to RxStem.count)
o RxStem.n.Priority
The print queue priority for entry n. (n = 1 to RxStem.count)
o RxStem.n.StartTime
The print queue starting time in minuttes after midnight for entry n.
(n = 1 to RxStem.count)
o RxStem.n.UntilTime
The print queue until time in minuttes after midnight for entry n. (n
= 1 to RxStem.count)
o RxStem.n.Type
The print queue type for entry n. (n = 1 to RxStem.count) The
following values are returned together with the decimal Type value:
Value returned This is
-------------------- ------------------------------------------
PRQ3_TYPE_RAW Data is always enqueued in the device
specific format.
PRQ3_TYPE_BYPASS Allows the spooler to bypass the queue
processor and send data directly to the
Printer Driver. Setting this bit allows
the spooler to print jobs of type PM_Q_RAW
while they are still being spooled.
PRQ3_TYPE_APPDEFAULT This bit is set for the application
default queue only.
o RxStem.n.Jobs
The number of jobs in the queue
o RxStem.n.Status
The printer queue status
Value Meaning
----- -------
0 Ok
1 Print Queue is paused
2 Delete pending
o RxStem.n.SepFile
The separator file for entry n. (n = 1 to RxStem.count)
o RxStem.n.PrProc
The default queue processor for entry n. (n = 1 to RxStem.count)
o RxStem.n.Parms
The default queue processor parameters for entry n. (n = 1 to
RxStem.count)
o RxStem.n.Comment
The queue description for entry n. (n = 1 to RxStem.count)
o RxStem.n.Printers
The printer devices connected to the queue for entry n. (n = 1 to
RxStem.count)
o RxStem.n.DriverName
The queue default printer driver name for entry n. (n = 1 to
RxStem.count)
Example use
/* Enumerate printer destination information */
if RxFuncQuery('RxSplEnumQueue') <> 0 then do
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs
end
ComputerName = '\\ILIDC'
MyRc = RxSplEnumQueue(ComputerName, RxStem)
if MyRc <> '0' then do
say 'Error from RxSplEnumQueue. RC =' MyRc
exit 9
end
if RxStem.count <> 0 then do
say 'Number of Queue Descriptions =' RxStem.count
do i=1 to RxStem.count
say
say 'Printer Queue name ' RxStem.i.Name
say 'Printer Queue priority ' RxStem.i.Priority
say 'Printer Queue starting time ' RxStem.i.StartTime
say 'Printer Queue until time ' RxStem.i.UntilTime
say 'Printer Queue type ' RxStem.i.Type
say 'Printer Queue seperator file' RxStem.i.SepFile
say 'Default queue processor ' RxStem.i.PrProc
say 'Queue processor parameters ' RxStem.i.Parms
say 'Printer Queue description ' RxStem.i.Comment
say 'Printers connected to Queue ' RxStem.i.Printers
say 'Default printer driver name ' RxStem.i.DriverName
end
end
else do
say 'No Printer Queues available'
end
call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'
exit 0
Inf-HTML End Run - Successful