0.9b (c) 1995 Peter Childs
The function returns a list of jobs in a print queue. This function is identical to NetEnumerate(NETPRINTJOB).
Syntax
MyRc = RxSplEnumJob('printJobInfo', SrvName, QueueName)
Parameters
The parameters specified are:
'printJobInfo' The REXX variable receiving the result. The variable is divided into:
o printJobInfo.count
The number of print jobs in the queue
o printJobInfo.i.JobId
The print job identification entry i, where the variable i has a value from 1 to printJobInfo.count
o printJobInfo.i.Priority
The print job priority entry i, where the variable i has a value from 1 to printJobInfo.count
o printJobInfo.i.Position
The print job position in the queue entry i, where the variable i has a value from 1 to printJobInfo.count
o printJobInfo.i.Status
The print job status in the queue entry i, where the variable i has a value from 1 to printJobInfo.count
o printJobInfo.i.Size
The print job size entry i, where the variable i has a value from 1 to printJobInfo.count
o printJobInfo.i.UserName
The userid entry i, where the variable i has a value from 1 to printJobInfo.count
o printJobInfo.i.Document
The document name entry i, where the variable i has a value from 1 to printJobInfo.count
o printJobInfo.i.Comment
The comment entry i, where the variable i has a value from 1 to printJobInfo.count
SrvName The server name
QueueName The queue name, which must be supplied
Note
The server name can be specified as '' for a local server or computer.
Example
/* List print jobs in a print queue */ if RxFuncQuery('RxSplEnumJob') <> 0 then do call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs end SrvName = '\\DOMAIN_CONTRLR' QueueName = 'LPT1Q' myRc = RxSplEnumJob('printJobInfo', SrvName, QueueName) if myRc <> '0' then do say 'Got error from RxSplEnumJob() ' myRc exit 9 end if printJobInfo.count = 0 then do say 'No print jobs in printer queue' exit 0 end say 'Number of print jobs: ' printJobInfo.count do i=1 to printJobInfo.count say say 'Job Id: ' printJobInfo.i.JobId say 'Userid: ' printJobInfo.i.UserName say 'Document name: ' printJobInfo.i.Document end exit 0
Inf-HTML End Run - Successful