Caché MultiValue Basic Reference
SPOOLER
[Back] [Next]
   
Server:docs2
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Returns information on queued print jobs.
Synopsis
SPOOLER(n[,ident])
Arguments
n An expression that resolves to an integer code specifying what category of information to return. Available values are 1 through 5, inclusive.
ident Optional — Limits information returned to jobs created by the specified ident. An expression that resolves to either a positive integer port number or an account name string. Applicable to n=2 and n=4 only. The default is to return information on all jobs, regardless of the creator.
Description
The SPOOLER function returns information about form queues, jobs, and assignments. It returns a dynamic array in which print jobs are separated by Field Marks, and information items for each print job are separated by Value Marks. Which jobs (Fields) are returned depends on the value of ident. The type of information (Values) returned for each job depends on the n flag value. The following n values are supported:
1 Form queue information, consisting of the following elements: 1=form queue name, 2=form queue type (the SP-CREATE device-type), 3=device name, 5=status, 6=number of jobs, 7=page skip.
2 Print job information, consisting of the following elements: 1=form queue name, 2=print job number, 3=username (OS login name), 4=port number of creator of job, 5=creation date (internal format), 6=creation time (internal format), 7=job status, 8=options (in legacy format), 9=print job size (in pages), 10=number of copies, 14=username (same as 3), 15=Caché username in a security-enabled locked-down system, otherwise "UnknownUser", 17=MV account name, 18=page size (in lines), 19=options (in long format), 20=current position of the despool process (in lines,copies format).
3 Current assignments, consisting of the following elements: 1=channel number (0 to 255), 2=form queue name, 3=options (in legacy format), 4=number of copies, 5=options (in long format).
4 Current jobs, consisting of the following elements: 1=report channel number, 2=print job number, 3=print job size (in pages), 4=creation date (internal format), 5=creation time (internal format), 6=job status, 7=username (OS login name), 8=username (OS login name), 9=MV account name,
5 New Caché values, consisting of the following element: 1=name of Caché global for spooler. Default is ^%MV.SPOOL.
SPOOLER(1) can return information on a form queue, or on a form queue group. If it is a form queue group (element 2=GROUP) then element 3 consists of a subvalue mark delimited list of the form queues in the group.
You can use the OCONV function to convert dates and times from internal to display format.
Examples
The following example illustrate the use of the SPOOLER 2 function:
PRINT ON 1 "The quick brown fox"
PRINT SPOOLER(2)
returns:
STANDARDý1ýFredý5948ý14213ý54958ýCLOSEDýý1ý1ýýýýFredýFredýýUSERý4ýý
which contains the following elements:
1 form queue name=STANDARD
2 print job number=1
3 username (OS login name)=Fred
4 port number of creator of job=5948
5 creation date (internal format)=14213 (29 NOV 2006)
6 creation time (internal format)=54958 (03:15:58PM)
7 job status=CLOSED
8 options (in legacy format) [none]
9 print job size (in pages)=1
10 number of copies=1
14 username (same as 3)=Fred
15 username (same as 3)=Fred
17=MV account name=USER
18=page size (in lines)=4
19=options (in long format).[none]
The following example illustrate the use of the SPOOLER 5 function:
PRINT SPOOLER(5)
returns:
^%MV.SPOOL
See Also