IBM OS/2 LAN Server REXX Utility DLL


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


RxSplQueryDevice()


The function does a returns print device information. A print device name 
must be specified. 
Syntax 


MyRc = RxSplQueryDevice(ComputerName, RxStem, PrDevName)


Parameters 
ComputerName   The name of the computer to query. Use '' for a local 
               computer 
PrDevName      The print device name to do the query against 

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.LogAddr 
     The printer device logical address 
   o RxStem.Comment 
     The printer device description 
   o RxStem.Drivers 
     Printer Drivers supported by the printer device. If more printer 
     drivers are connected, the printer drivers will be separated by a 
     comma. 
   o RxStem.time 
     Time the current job has been printing 
   o RxStem.Status 
     The printer device status 
   o RxStem.JobId 
     The id of the print job currently printing. A 0 indicates no print 
     job is currently printing 
   o RxStem.TimeOut 
     Printer device time out value 


Example use 

/* Get printer device information */
if RxFuncQuery('RxSplQueryDevice') <> 0 then do
 call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
 call LoadLsRxutFuncs
end

ComputerName = '\\ILIDC'
PrDevName = 'PRINTER1'

MyRc = RxSplQueryDevice(ComputerName, RxStem, PrDevName)

if MyRc <> '0' then do
 say 'Error from RxSplQueryDevice. RC =' MyRc
 exit 9
end

say
say 'Printer Device name           ' PrDevName
say 'Printer Device logical address' RxStem.LogAddr
say 'Printer Device description    ' RxStem.Comment
say 'Connected printer drivers     ' RxStem.Drivers
say 'Printer Device time out value ' RxStem.TimeOut

exit 0


Inf-HTML End Run - Successful