# Spooler Structure
Updated: 10/14/2021, 2:20:00 PM
Created: 10/14/2021, 2:20:00 PM
Last Updated By: mikes
Read Time: 6 minute(s)
The spooler on jBASE is a fairly straight-forward process. The actual print processes are jspprint programs that pipe the stdout of a report into whatever is specified in the SP-DEVICE command for that queue.
# Typical directory structure
spooler-- default directory name for spooler jobs -- Directory Holds "formqueue\_"# directory for each queue formqueue\_0 -- Directory Holds actual print jobs form formqueue "0" 1 -- \*NIX/Windows item of print job "1" 2 -- \*NIX/Windows item of print job "2" 4 -- \*NIX/Windows item of print job "4" formqueue\_1 -- Directory Holds actual print jobs form formqueue "0" 3 -- \*NIX/Windows item of print job "3" 5 -- \*NIX/Windows item of print job "5" jobs]D -- Empty DICT level of jobs file jspool\_log --jBASE hashed file. See typical items listed below jspool\_log]D --jBASE DICT file with dictionary defining items
# Typical jspool_log file items
|DEVCONFIG*0||-- Holds definition of device 0|
|DEVCONFIG*1||-- Holds definition of device 1|
|NextJobNumber||-- Holds DATE() in attribute 1 and next job number in attribute 2|
|DEVLOCK*0||-- Holds PID of jspprint program for device 0|
|DEVLOCK*1||-- Holds PID of jspprint program for device 1|
|DEVJOBS*1||-- Holds information on job number 1 (same format for all 5 jobs)|
|DEVFORMQUEUE*laserjet||-- Holds number of device for queue named "laserjet"|
|DEVFORMQUEUE*lineprinter||-- Holds number of device for queue named "lineprinter"|
|OwnerGroupSpooler||-- Holds queue ownership information|
# DICT jspool_log
The jspool_log is a standard jBASE hash file and can be LISTed and reported on using the dictionaries in the jspool_log file.
|Field Name||Attribute||Dict Heading||Conversion|
|SEC_OWNERS||28||Other Queue Owners|
# Spooler Job and Queue Status Codes
JOBS (JSTATUS): EQUATE DEVJOBS_STATUS_READY TO 1 ;* Status of job: Ready for printing. EQUATE DEVJOBS_STATUS_PRINTING TO 2 ;* Status of job: Currently being printed. EQUATE DEVJOBS_STATUS_FINISH TO 3 ;* Status of job: Completed and being held. EQUATE DEVJOBS_STATUS_OPEN TO 4 ;* Status of job: Opened and currently being written to. EQUATE DEVJOBS_STATUS_HOLD TO 5 ;* Status of job: Completed but held back from printing. EQUATE DEVJOBS_STATUS_EDIT TO 6 ;* Status of job: Being edited by another process. EQUATE DEVJOBS_STATUS_KILLED TO 7 ;* Status of job: Is a HOLD file, and has been killed. EQUATE DEVJOBS_STATUS_ALIGN TO 8 ;* Status of job: Being held waiting for ALIGN. QUEUES (QSTATUS): EQUATE DEVCONFIG_STATUS_IOERROR TO 1 ;* Device stopped due to an I/O error. EQUATE DEVCONFIG_STATUS_SUSPENDED TO 2 ;* Device has been suspended temporarily. EQUATE DEVCONFIG_STATUS_STOPPED TO 3 ;* Device has been stopped by operator. EQUATE DEVCONFIG_STATUS_ALIGN TO 4 ;* Device has been suspended while ALIGNing paper EQUATE DEVCONFIG_STATUS_ACTIVE TO 5 ;* Device is actually printing EQUATE DEVCONFIG_STATUS_ASSIGNED TO 6 ;* Device is assigned, but nothing to do. EQUATE DEVCONFIG_STATUS_NODEVICE TO 7 ;* Device has no knowledge of where to put its output. EQUATE DEVCONFIG_STATUS_KILLED TO 8 ;* Device has been killed somehow.
# The route of a typical print job
# Print queue settings derived from SP-ASSIGN and TERM
The typical print job will begin with an SP-ASSIGN statement and possibly TERM statement to assign the form queue and printer depth and width. Note that assignment will default to STANDARD if no SP-ASSIGN is executed.
SP-ASSIGN =laserjet TERM ,,,,,,112,30
# Banner / Form Width and Depth set from jspform item
The default jspform item located in $JBCRELEASEDIR/config/jspform_deflt will set printer width to 132 and depth to 64 regardless of the TERM setting specified and on LINUX will specify a banner to be used. This item is self documented and can be altered. Be aware that this item would be overlayed if jBASE were upgraded. SP-TYPE can be used to assign other than this default formtype.
# Translation occurs based on jspxl item
Translation item as defined in SP-TRANSLATE or $JBCRELEASEDIR/config/jspxl_deflt is read to determine what translations are to take place. Note that SP-TRANSLATE item read only when printer is initialized.
# The item is passed via stdout to the device specified
SP-DEVICE defines the device/program used for printing. This is typically the local printer program lp, but with the PROG device type any program that can read from stdin (INPUT) can be used.
Back to Spooler.