Spooler Plus Programmer’s Guide Abstract This manual describes the Spooler Plus subsystem, its uses, and its applications. This guide is intended for application programmers who want to use the Spooler Plus interface procedures to spool data programmatically. Product Version Spooler Plus D41 Spooler Plus H01 Spooler Plus H02 Supported Release Version Updates (RVUs) This publication supports D48.03 and all subsequent D-series RVUs, G06.17 and all subsequent G-series RVUs, and H06.
Document History Part Number Product Version Published 130198 Spooler Plus D41 July 1997 135718 Spooler Plus D41 August 1997 522293-001 Spooler Plus D41 August 2002 522293-002 Spooler Plus D41 July 2005 Spooler Plus H01 522293-003 Spooler Plus D41 Spooler Plus H01 Spooler Plus H02 August 2012
Legal Notices © Copyright 2012 Hewlett-Packard Development Company, L.P. Legal Notice Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. The information contained herein is subject to change without notice.
Spooler Plus Programmer’s Guide Index Examples Figures Tables Legal Notices What’s New in This Manual vii Manual Information vii New and Changed Information vii About This Manual ix Who Should Use This Manual ix How This Manual Is Organized x Related Manuals xi Notation Conventions xi HP Encourages Your Comments xi 1.
Contents 1. Introduction to the Spooler Plus Subsystem (continued) Print Process Attributes 1-13 Print Process States 1-14 1.
Contents 3. Using the Spooler Print Procedures, Print Processes, and Perusal Processes (continued) How the HP Print Process Handles a Job 3-2 External Declarations for Print Procedures 3-3 3.
Contents 4. Spooler Procedure Calls (continued) SPOOLCONTROLBUF Procedure Considerations 4-27 Example 4-27 4-26 4.
Contents Examples Examples Example 2-1. Example 2-2. Example 2-3. Example 2-4. Example 2-5. Example 2-6. Example 2-7. Example 2-8.
Contents Tables (continued) Tables (continued) Table 4-3. Table 4-4. Table 4-5. Table 4-6. Table 4-7. Table 4-8. Table 4-9. Table 4-10. Table 4-11.
What’s New in This Manual Manual Information Spooler Plus Programmer’s Guide Abstract This manual describes the Spooler Plus subsystem, its uses, and its applications. This guide is intended for application programmers who want to use the Spooler Plus interface procedures to spool data programmatically. Product Version Spooler Plus D41 Spooler Plus H01 Spooler Plus H02 Supported Release Version Updates (RVUs) This publication supports D48.03 and all subsequent D-series RVUs, G06.
What’s New in This Manual Updated the SPOOLEREQUEST error code details on C-8. Added an additional criteria for SPOOLERSTATUS2 on 4-51. Changes in the July 2005 manual: Throughout the manual, the HP Integrity NonStop™ NS-series servers and systems are mentioned when discussing NonStop S-series servers and systems. In Section 1, Introduction to the Spooler Plus Subsystem, hyperlinks have been added to the list of topics.
About This Manual The Spooler Plus Programmer’s Guide describes the Spooler Plus subsystem, its uses, and its applications for experienced programmers.
About This Manual How This Manual Is Organized How This Manual Is Organized Table i summarizes the contents of this manual. Table i. Contents Section or Appendix Title Contents 1 Introduction to the Spooler Plus Subsystem Provides detailed information on the Spooler Plus subsystem and its components that is of special interest to programmers. All programmers should read this section before reading any of the other parts of this guide.
About This Manual Related Manuals Related Manuals Before reading this guide, you should be familiar with the following manuals: Spooler Plus Utilities Reference Manual This manual contains the complete syntax, considerations, and examples for the utilities Peruse, Spoolcom, Font, and RPSetup.
About This Manual General Syntax Notation computer type. Computer type letters within text indicate C and Open System Services (OSS) keywords and reserved words; enter these items exactly as shown. Items not enclosed in brackets are required. For example: myfile.c italic computer type. Italic computer type letters within text indicate C and Open System Services (OSS) variable items that you supply. Items not enclosed in brackets are required. For example: pathname [ ] Brackets.
About This Manual General Syntax Notation Punctuation. Parentheses, commas, semicolons, and other symbols not previously described must be entered as shown. For example: error := NEXTFILENAME ( file-name ) ; LISTOPENS SU $process-name.#su-name Quotation marks around a symbol such as a bracket or brace indicate the symbol is a required character that you must enter as shown. For example: "[" repetition-constant-list "]" Item Spacing.
About This Manual Notation for Messages !o:i. In procedure calls, the !o:i notation follows an output buffer parameter that has a corresponding input parameter specifying the maximum length of the output buffer in bytes. For example: error := FILE_GETINFO_ ( filenum , [ filename:maxlen ] ) ; !i !o:i Notation for Messages The following list summarizes the notation conventions for the presentation of displayed messages in this manual. Nonitalic text.
About This Manual Notation for Management Programming Interfaces % Percent Sign. A percent sign precedes a number that is not in decimal notation. The %þnotation precedes an octal number. The %Bþnotation precedes a binary number. The %Hþnotation precedes a hexadecimal number. For example: %005400 P=%p-register E=%e-register Notation for Management Programming Interfaces UPPERCASE LETTERS. Uppercase letters indicate names from definition files; enter these names exactly as shown.
About This Manual HP Encourages Your Comments Spooler Plus Programmer’s Guide—522293-003 xvi
1 Introduction to the Spooler Plus Subsystem The Spooler Plus subsystem serves as a buffer between an application writing to a print device and the device itself, allowing applications to create hard-copy output without affecting the status of print devices. The Spooler Plus subsystem performs its work by storing the output from each application on disk and monitoring the status of print devices. When the appropriate device becomes available, the Spooler Plus subsystem prints the output.
Introduction to the Spooler Plus Subsystem Spooler and Spooler Plus Comparison Spooler and Spooler Plus Comparison Spooler Plus is an optional product containing Spoolcom and Peruse modules that can be used to replace the Spoolcom and Peruse modules provided by the D41 or later product versions of the Spooler subsystem. You can use the Spooler Plus Spoolcom and Peruse utilities to configure and manage expanded configurations of the Spooler subsystem.
Introduction to the Spooler Plus Subsystem Spooler Components Spooler Components The spooler consists of a set of related processes and procedures, as shown in Table 1-1. Table 1-1.
Introduction to the Spooler Plus Subsystem Spoolcom Spoolcom The Spoolcom utility allows you to declare and initialize collectors and print processes, define and modify the routing structure, control the printing of jobs, and obtain the status of any component of the spooler. Spoolcom also incorporates the perusal functions of Peruse. You can run Spoolcom from a terminal to translate your commands into messages to the spooler supervisor, which carries out your instructions.
Introduction to the Spooler Plus Subsystem Spoolcom Figure 1-1. Components of the Spooler \SYS Spooler Subsystem Application Spoolcom Spooler Control Files Peruse Supervisor Collector Collector Data Font and RPSetup Print Process Printers Input/ Output Process Legend Applications can perform all the functions of Peruse, Spoolcom, Font, and RPSetup; therefore, these programs can be considered applications. A print process can be FASTP, PSPOOL, PSPOOLB, or user written VST011.
Introduction to the Spooler Plus Subsystem Disk Files Maintained by the Spooler Disk Files Maintained by the Spooler The spooler maintains two sets of disk files: data files and control files. Data files are unstructured files containing the spooled data from all the jobs in the spooler subsystem. Each collector has its own data file to hold jobs written to it. The collector maintains an internal structure in the data file to ensure the integrity of jobs and most efficiently use the storage space.
Introduction to the Spooler Plus Subsystem Spooler States names will cause the affected components to fail. When starting multiple spooler subsystems, monitor the spooler error log file (usually $0, the event log file for operator messages) for reports of process creation errors that indicate that the specified collector or print process could not be started because the name given was already in use. Spooler States During its life, the spooler cycles through the five states shown in Figure 1-2.
Introduction to the Spooler Plus Subsystem Spooler States The meanings of the spooler states are as follows: COLD The first step in creating the spooler is to run the spooler supervisor. The spooler is in the COLD state as soon as you start the supervisor. At this time, use Spoolcom to declare and initialize the collectors and print processes.
Introduction to the Spooler Plus Subsystem Spooling From an Application Program Spooling From an Application Program Spooling from an application program can be performed with the Guardian file-system procedures or with the spooler interface procedures described in Section 2, Using the Spooler Interface Procedures. These procedures give you complete control of the contents and attributes of your job.
Introduction to the Spooler Plus Subsystem Job States While Spooling From a Program zeros) is replaced by one word describing the character and the number of words being compressed. For example, an 80-character line containing all blanks would be compressed into a single word. Job States While Spooling From a Program The term job refers to the data written by an application process to a collector.
Introduction to the Spooler Plus Subsystem Collector Attributes Collector Attributes Table 1-3 lists the default attributes of collectors and the Spoolcom COLLECT subcommands used to specify them. Table 1-3. Collector Attributes Collector Attribute Spoolcom COLLECT Subcommand Default Value Program file FILE $SYSTEM.SYSTEM.
Introduction to the Spooler Plus Subsystem Unit Size The meanings of the collector states are as follows: DORMANT A collector in the dormant state cannot accept new jobs for spooling, and no jobs are currently being spooled. You can set and modify collector attributes while it is in the dormant state. The Spoolcom command COLLECT START puts a dormant collector in the active state. ACTIVE A collector in the active state can accept new jobs for spooling.
Introduction to the Spooler Plus Subsystem Print Processes The collector file size can be any size allowed by the Guardian file system. The file’s buffer size attribute is used to set the collector’s internal buffer size. The Collector unit size attribute must be a whole multiple of the buffer size attribute, or the buffer size must be a whole multiple of the unit size. You must set the buffer size to at least 2K bytes. You can also set the buffer size to a multiple of 2K bytes.
Introduction to the Spooler Plus Subsystem Print Process States Print Process States A print process, once declared, is always in one of three states: active, dormant, or procerror, as shown in Figure 1-4. Figure 1-4. Print Process States PROCERROR Supervisor declares error ACTIVE PRINT START Supervisor notifies print process that a job is ready to be printed You can set and modify attributes Job finished printing DORMANT VST013.
Introduction to the Spooler Plus Subsystem PROCERROR Independent Print Processes The supervisor has determined that the print process is not responding correctly. When the supervisor places a print process into this state, it writes a message to the error log file. (These messages are typically sent to the console, although their destination is set at system startup time and can be changed with the Spoolcom SPOOLER ERRLOG command. The error log messages are described in the Operator Messages Manual.
Introduction to the Spooler Plus Subsystem Devices The Spoolcom PRINT DELETE command removes the independent print process from the spooler subsystem but does not stop the physical process. Second, stop the physical process by issuing the TACL STOP command. When you use both of these commands to stop an independent print process, no error message is written to the log file.
Introduction to the Spooler Plus Subsystem Device Attributes Device Attributes Table 1-5 lists the default attributes of spooler devices and the Spoolcom DEV subcommands used to specify them. Refer to the Spooler Plus Utilities Reference Manual for a complete description of the Spoolcom DEV subcommands. Table 1-5. Device Attributes (page 1 of 2) Device Attribute Spoolcom DEV Subcommand Default Value Comment Form name FORM All blanks Guarantees that only certain types of jobs print on the device.
Introduction to the Spooler Plus Subsystem Device Attributes Table 1-5. Device Attributes (page 2 of 2) Device Attribute Spoolcom DEV Subcommand Default Value Retry interval RETRY 5 (seconds) Number of retries TIMEOUT 360 (seconds) Header message HEADER HEADER Printed at beginning (and optionally at end) of every job. Its type is determined by the print process. The standard print process header contains the job report name, location, and job number.
Introduction to the Spooler Plus Subsystem Device States Device States At any particular time, each device in the spooler subsystem is in one of several states, as shown in Figure 1-5. Figure 1-5.
Introduction to the Spooler Plus Subsystem Declaring and Initializing Devices The state of a device describes what the device is doing and determines which Spoolcom commands are valid. The meanings of the device states are as follows: BUSY The device is currently printing a job.
Introduction to the Spooler Plus Subsystem Virtual Devices associated print process that performs the task of retrieving and printing jobs on that device. Refer to Section 3, Using the Spooler Print Procedures, Print Processes, and Perusal Processes, for more information on using print processes. Virtual Devices When a device becomes available, the supervisor tells the print process associated with the device to retrieve and print the next job.
Introduction to the Spooler Plus Subsystem Routing Structure Routing Structure The spooler includes a flexible routing structure whose function is to direct jobs to print devices. The routing structure consists of a set of locations, logically organized into groups, and connections between locations and print devices. Locations A location is the logical destination of a job (as opposed to the physical destination, which is a print device).
Introduction to the Spooler Plus Subsystem Jobs LOC, you can set the broadcast mode attribute for the group to print a job at every device associated with the group (BROADCAST ON) or only at the device that would finish the job first (BROADCAST OFF). Devices can have any number of locations connected to them, but each location can have only one device connected to it. A group can have several devices associated with it. Each device must be connected to a different destination contained in the group.
Introduction to the Spooler Plus Subsystem Job States Job States The status of a job is described by its state. At any time, each job in the spooler subsystem is in one of several states, shown in Figure 1-6. Figure 1-6. Job States Job enters spooler OPEN Job finishes spooling READY User puts job on hold HOLD Job waits in device queue PRINT You can modify attributes with SPOOLCOM If holdafter flag is set Spooler deletes printed job VST005.
Introduction to the Spooler Plus Subsystem Job Numbers The meanings of the job states are as follows: OPEN The job has been added to the spooler. It remains in this state until it has finished spooling. READY The job is ready to print, but it has not yet begun to print because another job is ahead of it in the device queue or because its location is not connected to a device. HOLD You can place a job on HOLD in order to prevent it from printing or to change its attributes.
Introduction to the Spooler Plus Subsystem Controlling Jobs Controlling Jobs The Spoolcom JOB subcommands HOLD, START, and DELETE allow a job to be put on hold, taken off hold, or deleted from the spooler subsystem. To change job attributes, the job must be in the hold state. You can place a job on hold at any time except when it is open. Placing a job on hold takes the job off any device queue that it is on.
Introduction to the Spooler Plus Subsystem The Spooler and Batch Jobs The method that the spooler uses to determine if a job becomes a normal job, the first job in a batch job, or a job to be linked to an existing batch job is shown in Figure 1-7. If a job is part of a batch job, you cannot alter the key attributes unless you use the Peruse UNLINK command or the UNLINK option of the Spoolcom BATCH command to unlink the job from the batch job.
Introduction to the Spooler Plus Subsystem Spooler Plus Programmer’s Guide—522293-003 1-28 The Spooler and Batch Jobs
2 Using the Spooler Interface Procedures Application programs can spool jobs (that is, write the data for a spooler job) using a group of procedures that act as an interface between an application program and a collector process in a spooler subsystem. These procedures are usually referred to as spooler interface procedures. This section describes how to use these procedures in an application program. Table 2-1 contains a summary of the spooler interface procedures.
Using the Spooler Interface Procedures External Declarations for Spooler Interface Procedures External Declarations for Spooler Interface Procedures To use spooler interface procedures in a TAL program, you must declare them to be external to your program. The external declarations for the interface procedures are located in the file $SYSTEM.SYSTEM.EXTDECS0. They can be sourced into your program with the following compiler command: ?SOURCE $SYSTEM.SYSTEM.EXTDECS0 (SPOOLSTART, SPOOLWRITE, ...
Using the Spooler Interface Procedures Opening a File to a Collector A buffer allocated above the data stack that is limited to 500 bytes. This buffer is indicated by the level-3-buff parameter. A buffer allocated in an extended data segment. Extended data segments can be much larger than 512 bytes This buffer is indicated by the extended-level-3-buff parameter. Extended data segments are discussed in the Guardian Programmer’s Guide. Use either the level-3-buff or extended-level-3-buff, but not both.
Using the Spooler Interface Procedures Summary of Spooling From an Application Program string for the collector and location (as the filename input parameter) and the length of the string. Note. If the filename input parameter is not fully qualified, FILE_OPEN_ uses the current settings, including the system name, in the =_DEFAULTS DEFINE, for unspecified parts including the system.
Using the Spooler Interface Procedures Summary of Spooling From an Application Program SPOOLCONTROL, SPOOLCONTROLBUF, and SPOOLSETMODE take the place of the Guardian file-system procedures CONTROL, CONTROLBUF, and SETMODE, for level-3 spooling. SPOOLWRITE compresses and stores the data from several successive calls. Only when its buffer is full does it write to the spooler. Applications should issue a top-of-form control at the beginning and end of all jobs.
Using the Spooler Interface Procedures Summary of Spooling From an Application Program Example 2-1. Annotated Example of Level-1 Spooling (page 1 of 2) ! This program is an example of level-1 spooling. It consists of 3 ! procedures: error, getline, and root, and it calls the ! Guardian procedures OPEN, CLOSE, WRITE, and STOP. ! error --this procedure handles I/O errors. It performs the ! necessary steps for recovery or it aborts the program. ! sperror --this procedure handles Spooler errors.
Using the Spooler Interface Procedures Summary of Spooling From an Application Program Example 2-1. Annotated Example of Level-1 Spooling (page 2 of 2) BEGIN int temp, done; temp :=0; temp := counter.
Using the Spooler Interface Procedures Summary of Spooling From an Application Program 4. The job leaves the open state when you close the file to the collector with the filesystem CLOSE procedure. Depending on the hold option specified in the call to SPOOLSTART, the job will go to the READY state or the HOLD state at the location specified. Example 2-2 is an example of level-2 spooling. Example 2-2.
Using the Spooler Interface Procedures Summary of Spooling From an Application Program Example 2-2. Annotated Example of Level-2 Spooling (page 2 of 3) ?nolist INT counter := 0; ?SOURCE $SYSTEM.SYSTEM.EXTDECS(OPEN, CLOSE, WRITE, STOP, ?SPOOLSTART) PROC error; BEGIN CALL STOP; END; PROC sperror (errnum); INT errnum; BEGIN CALL STOP; END; INT PROC getline( line, length); INT .line, .length; BEGIN int temp, done; temp :=0; temp := counter.
Using the Spooler Interface Procedures Summary of Spooling From an Application Program Example 2-2. Annotated Example of Level-2 Spooling (page 3 of 3) ! Open file to collector, and check for errors.
Using the Spooler Interface Procedures Summary of Spooling From an Application Program Example 2-3. Annotated Example of Level-3 Spooling (page 1 of 3) ! ! ! ! ! This program is an example of level-3 spooling. It consists of 4 procedures: error, sperror, getline, and root, and it calls the Guardian procedures OPEN, CLOSE, and STOP. It uses the spooler interface procedures SPOOLSTART, SPOOLWRITE, and SPOOLEND to spool the job. ! error --this procedure handles I/O errors.
Using the Spooler Interface Procedures Summary of Spooling From an Application Program Example 2-3. Annotated Example of Level-3 Spooling (page 2 of 3) ?SOURCE $SYSTEM.SYSTEM.EXTDECS (OPEN, CLOSE, WRITE, STOP, ?SPOOLSTART, SPOOLWRITE, SPOOLEND) PROC error; BEGIN CALL STOP; END; PROC sperror (errnum); INT errnum; BEGIN CALL STOP; END; INT PROC getline( line, length); INT .line, .length; BEGIN int temp, done; temp :=0; temp := counter.
Using the Spooler Interface Procedures Summary of Spooling From an Application Program Example 2-3.
Using the Spooler Interface Procedures COBOL Spooling COBOL Spooling Programs written in COBOL can spool their data at level 2 or 3 in the same manner as a TAL program. COBOL users typically use the spooling facilities provided by COBOL. See the COBOL85 Manual for more information. COBOL Spooling—Level 1 Level-1 spooling from COBOL is not supported. COBOL Spooling—Levels 2 and 3 To spool from COBOL, use one of the COBOL utility routines: COBOLSPOOLOPEN permits level-2 spooling for COBOL users.
Using the Spooler Interface Procedures COBOL Spooling—Levels 2 and 3 Example 2-4. Example of Spooling From COBOL (page 1 of 2) IDENTIFICATION DIVISION. PROGRAM-ID. SPOOLER. ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. HP. OBJECT-COMPUTER. HP. SPECIAL-NAMES. FILE "$SYSTEM.SYSTEM.CBL85UTL" IS CBL85UTL. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT IN-FILE ASSIGN TO "SPOOLEE" FILE STATUS IS FILE-STAT. SELECT OUT-FILE ASSIGN TO "$S" FILE STATUS IS FILE-STAT. DATA DIVISION. FILE SECTION.
Using the Spooler Interface Procedures COBOL Spooling—Levels 2 and 3 Example 2-4. Example of Spooling From COBOL (page 2 of 2) PROCEDURE DIVISION. DECLARATIVES. UA-IN-FILE SECTION. USE AFTER ERROR PROCEDURE ON IN-FILE. UA-IN-FILE-PROC. IF NOT IN-FILE-EOF DISPLAY "IN-FILE ERROR=" FILE-STAT. UA-OUT-FILE SECTION. USE AFTER ERROR PROCEDURE ON OUT-FILE. UA-OUT-FILE-PROC. IF NOT IN-FILE-EOF DISPLAY "OUT-FILE ERROR=" FILE-STAT. END DECLARATIVES. MAIN SECTION. BEGIN-PROGRAM.
Using the Spooler Interface Procedures Spooling From a NonStop Process Pair Spooling From a NonStop Process Pair An application process sending data to a collector can run as a NonStop process pair. Programmers writing such applications should be aware of the checkpointing considerations described in this subsection. This discussion assumes that you already have knowledge of fault-tolerant programming (coding NonStop process pairs).
Using the Spooler Interface Procedures Spooling—Levels 1 and 2 synchronization block for the file to the collector immediately before every write of a line of data to the collector. In the event of a failure after the checkpoint, the backup process will execute the write with the correct line. If the failure occurs following the write but before the next checkpoint, the backup will re-execute the write of the last line sent. When you print this job, the listing will contain two copies of the line. Note.
Using the Spooler Interface Procedures Spooling—Levels 1 and 2 Example 2-5. Annotated Example of Level-1 Spooling From a NonStop Process Pair With a Zero Sync Depth (page 2 of 3) ?SOURCE $SYSTEM.SYSTEM.EXTDECS(OPEN, CLOSE, WRITE, STOP, ?CHECKOPEN,CHECKPOINT) PROC error; BEGIN CALL STOP; END; PROC cherror (george); INT george; BEGIN CALL STOP; END; PROC stbackup; BEGIN counter := counter; END; INT PROC getline( line, length); INT .line, .length; BEGIN int temp, done; temp :=0; temp := counter.
Using the Spooler Interface Procedures Spooling—Levels 1 and 2 Example 2-5. Annotated Example of Level-1 Spooling From a NonStop Process Pair With a Zero Sync Depth (page 3 of 3) line [0:39], ! contains the line of data to spool length; ! contains the number of bytes to write from line ! Start the backup and check if this is the backup CALL stbackup; ! Open file to collector, and check for errors.
Using the Spooler Interface Procedures Spooling—Levels 1 and 2 Spooling With a Nonzero Sync Depth To prevent a line from being duplicated, you can take advantage of the sync depth feature of the file system. To use this feature, you should open the collector with a nonzero sync depth. The program should perform a checkpoint before every nth write to the collector, where n is the sync depth.
Using the Spooler Interface Procedures Spooling—Levels 1 and 2 Example 2-6. Annotated Example of Level-2 Spooling From a NonStop Process Pair With a Nonzero Sync Depth (page 2 of 4) ! getline --this procedure returns a line of data for spooling. ! It is an INT procedure that returns a zero (FALSE) value when ! it has no data to spool. It has two parameters: line and ! length. line is a reference to a 40-word (80-byte) array. ! The array is filled with the line of data to be spooled.
Using the Spooler Interface Procedures Spooling—Levels 1 and 2 Example 2-6.
Using the Spooler Interface Procedures Spooling—Levels 1 and 2 Example 2-6. Annotated Example of Level-2 Spooling From a NonStop Process Pair With a Nonzero Sync Depth (page 4 of 4) ! Checkpoint call to SPOOLSTART (in this example none of the ! parameters to SPOOLSTART have been computed so this checkpoint ! is not necessary, but most practical programs would need this ! checkpoint).
Using the Spooler Interface Procedures Spooling—Level 3 Spooling—Level 3 An application process spooling at level 3 writes data to the collector using the spooler interface procedures. SPOOLWRITE, SPOOLCONTROL, SPOOLCONTROLBUF, and SPOOLSETMODE do not actually write a line of data to the collector each time one of them is called. Instead, they put the data in the level-3-buffer you specified in an earlier call to SPOOLSTART.
Using the Spooler Interface Procedures Spooling—Level 3 Figure 2-1. Buffer Overflow Logic Enter No Would buffer overflow ? Yes No flags. <11>=1 ? Yes Is this second call? Yes No Return %1100 User must checkpoint buffer and recall SPOOLWRITE Write buffer to collector Put current line in buffer Return 0 Spooler Plus Programmer’s Guide—522293-003 2-26 VST007.
Using the Spooler Interface Procedures Spooling—Level 3 Spooling With a Zero Sync Depth After opening and initializing the level-3-buffer, you can begin spooling with the interface procedures. If SPOOLCONTROL, SPOOLSETMODE, SPOOLCONTROLBUF, or SPOOLWRITE returns an error code of %11000, then the data given in the last call to that procedure would cause the level-3-buffer to be written to the collector.
Using the Spooler Interface Procedures Spooling—Level 3 Example 2-7. Annotated Example of Level-3 Spooling From a NonStop Process Pair With a Zero Sync Depth (page 2 of 4) ! error --this procedure handles I/O errors. It performs the ! necessary steps for recovery or it aborts the program. ! sperror --this procedure handles spooler errors. It performs the ! necessary steps for recovery or it aborts the program.
Using the Spooler Interface Procedures Spooling—Level 3 Example 2-7.
Using the Spooler Interface Procedures Spooling—Level 3 Example 2-7. Annotated Example of Level-3 Spooling From a NonStop Process Pair With a Zero Sync Depth (page 4 of 4) sperrnum := SPOOLSTART(collectnum, buffer, location,,,, 40, %B0000000000110111); ! Test for an error from SPOOLSTART If sperrnum THEN CALL sperror(sperrnum); ! Get a line of data and test for done. ! If done, fall through.
Using the Spooler Interface Procedures Spooling—Level 3 Spooling With a Nonzero Sync Depth In this type of spooling, you must specify the sync depth when you open the collector and set bit 11 of flags in SPOOLSTART. Your program need not perform a checkpoint each time SPOOLWRITE, SPOOLSETMODE, SPOOLCONTROL, or SPOOLCONTROLBUF returns an error code of %11000. You should perform a checkpoint each time the number of writes performed since the last checkpoint equals the sync depth.
Using the Spooler Interface Procedures Spooling—Level 3 Example 2-8. Annotated Example of Level-3 Spooling From a NonStop Process Pair With a Nonzero Sync Depth (page 2 of 5) ! getline --this procedure returns a line of data for spooling. ! It is an INT procedure that returns a zero (FALSE) value when ! it has no data to spool. It has two parameters: line and ! length. line is a reference to a 40-word (80-byte) array. ! The array is filled with the line of data to be spooled.
Using the Spooler Interface Procedures Spooling—Level 3 Example 2-8.
Using the Spooler Interface Procedures Spooling—Level 3 Example 2-8.
Using the Spooler Interface Procedures Spooling—Level 3 Example 2-8.
Using the Spooler Interface Procedures Spooler Plus Programmer’s Guide—522293-003 2-36 Spooling—Level 3
3 Using the Spooler Print Procedures, Print Processes, and Perusal Processes The spooler print procedures enable print and perusal processes to access spooled data and enable all print processes to communicate with the spooler supervisor. This section describes how to use the spooler print procedures and write print and perusal processes. Print and Perusal Processes A print process retrieves spooled job data from disk and sends it to the appropriate output device.
Using the Spooler Print Procedures, Print Processes, and Perusal Processes How the HP Print Process Handles a Job Table 3-1 contains a summary of the print procedures. You can find the complete syntax and considerations of the spooler print procedures in Section 4, Spooler Procedure Calls. Refer to Print Procedure Errors on page C-10 for a list of print procedure error codes. Table 3-1. Summary of Print Procedures Procedure Function PRINTCOMPLETE Obtains a message from the spooler.
Using the Spooler Print Procedures, Print Processes, and Perusal Processes External Declarations for Print Procedures 6. The print process now reads the job, one line at a time, by a series of calls to PRINTREAD, and writes each line to the device until an end of file is returned. Note. Be aware that when some devices (notably drum printers) encounter a non-ASCII character, the printer can lock up unless you specified CTRLTOSPACE in the system generation configuration for the printer.
Using the Spooler Print Procedures, Print Processes, and Perusal Processes Writing a Print Process Writing a Print Process The following pages discuss the considerations associated with writing your own print process. Appendix A, Sample Print Process, contains an example of a user-written print process. A print process must perform three tasks: 1. Read the Startup message. 2. Retrieve and print spooled data (using PRINTSTART and PRINTREAD). 3.
Using the Spooler Print Procedures, Print Processes, and Perusal Processes Retrieving and Printing Spooled Data Retrieving and Printing Spooled Data The sequence of events involved in retrieving and printing a job is as follows: 1. Open the spooler supervisor with nowait I/O, call PRINTINIT to format a print control buffer, and call AWAITIO[X] to wait for a message from the supervisor. Call PRINTCOMPLETE to get the print-control-buffer from the supervisor. 2.
Using the Spooler Print Procedures, Print Processes, and Perusal Processes Communicating With the Spooler Supervisor completion after every write to the device can respond immediately to a message such as “skip to page 3,” “send job status,” or “suspend job.” The supervisor times out any print process that waits more than 10 minutes to respond to a message.
Using the Spooler Print Procedures, Print Processes, and Perusal Processes Device Errors Device Errors When errors are encountered on a print device during the printing of a job, the print process should call PRINTSTATUS with the following messages: For the first occurrence of a device error following any number of successful operations on the device, the print process should specify a msg-type of 5 and pass the error number in the error parameter.
Using the Spooler Print Procedures, Print Processes, and Perusal Processes Combining Data Retrieval With Spooler Communication Combining Data Retrieval With Spooler Communication A print process must perform the tasks of retrieving and printing jobs and responding to supervisor messages concurrently. This can be accomplished in any manner that you find convenient. The only limitation is that a print process must respond to a supervisor message within 10 minutes.
Using the Spooler Print Procedures, Print Processes, and Perusal Processes Writing a Perusal Process 2. Declare a print device, specify its print process to be the one you are debugging, and connect the device to a location. 3. Run a simple job to your debugging spooler—for example, try a TACL FILES or STATUS command, specifying your collector as the OUT file. 4. When the command interpreter prompt (for example, TACL 17>) comes back, indicating that the spooler has accepted your job, enter PAUSE.
Using the Spooler Print Procedures, Print Processes, and Perusal Processes Outline of the Basic Perusal Process that allows a user to select a job for scanning and displays pages of the job on the home terminal. Commands would allow you to display a specific page, skip ahead or back pages, and so forth.
Using the Spooler Print Procedures, Print Processes, and Perusal Processes Outline of the Basic Perusal Process 5. The job can now be accessed with a succession of calls to PRINTREAD: err := PRINTREAD( job^buf, data^line, read^count ); IF err THEN ... ! PRINTREAD error ELSE ... ! data^line contains the ! next line of spooled data Note. Some PRINTREAD messages occur normally, such as end of file, end of copy, CONTROL, and SETMODE.
Using the Spooler Print Procedures, Print Processes, and Perusal Processes Spooler Plus Programmer’s Guide—522293-003 3-12 Outline of the Basic Perusal Process
4 Spooler Procedure Calls There are two types of spooler procedures: print procedures, whose names start with PRINT, and spooler procedures, whose names start with SPOOL. These procedures are summarized in Table 4-1 and their use is described in the remainder of this section. Table 4-1. Summary of Spooler and Print Procedures (page 1 of 2) Procedure Description PRINTCOMPLETE Obtains a message from the spooler. PRINTCOMPLETE[2] Obtains a message from the spooler.
Spooler Procedure Calls Table 4-1. Summary of Spooler and Print Procedures (page 2 of 2) Procedure Description SPOOLJOBNUM Returns the job number of the job currently being spooled to the collector. SPOOLSETMODE Replaces the Guardian file-system SETMODE procedure when spooling at level 3. SPOOLSTART Specifies job attributes and optionally initializes a level-3 buffer. SPOOLWRITE Compresses, blocks, and sends data to the spooler.
Spooler Procedure Calls PRINTCOMPLETE[2] Procedure PRINTCOMPLETE[2] Procedure The PRINTCOMPLETE[2] procedure is used by a print process to communicate with the spooler supervisor. The PRINTCOMPLETE procedure obtains a message from the supervisor. PRINTCOMPLETE[2] is the same procedure with a larger buffer.
Spooler Procedure Calls Example PRINTCOMPLETE[2] must be called immediately following the completion of a call on the file to the supervisor. In addition to obtaining the supervisor message, PRINTCOMPLETE[2] also initiates a nowait operation to the supervisor file. Thus, a call to AWAITIO[X] must be issued to the supervisor file at some time after a call to PRINTCOMPLETE[2].
Spooler Procedure Calls PRINTINFO Procedure PRINTINFO Procedure The PRINTINFO procedure is used in print processes to communicate with the spooler supervisor. The PRINTINFO procedure returns information regarding a job to the supervisor in response to a “send status” request. This includes spooler job files.
Spooler Procedure Calls Considerations returns the total number of lines printed for this copy of the job. Considerations The following considerations apply to the use of the PRINTINFO procedure: PRINTINFO should not be used by a perusal process. A print process operates with, and under the control of, the supervisor, while a perusal process operates on its own. PRINTINFO is used by a print process (the PRINTSTART or PRINTREAD procedure) to respond to a status request from the supervisor.
Spooler Procedure Calls PRINTINIT[2] Procedure PRINTINIT[2] Procedure The PRINTINIT[2] procedure is used in print processes to initialize communication with the spooler supervisor. The PRINTINIT procedure initializes the print process's print control buffer, which is used in calls to other print procedures. PRINTINIT[2] is the same procedure with a larger buffer.
Spooler Procedure Calls Considerations Considerations The following considerations apply to the use of the PRINTINIT[2] procedure: PRINTINIT[2] should not be used by a perusal process. A print process operates with, and under the control of, the supervisor, while a perusal process operates on its own. Before calling PRINTINIT[2], a print process must have a file open to the supervisor with nowait I/O and a sync depth of, at most, 1.
Spooler Procedure Calls PRINTREAD Procedure PRINTREAD Procedure The PRINTREAD procedure can be used in print and perusal processes to access spooled data and to allow print processes to communicate with the spooler supervisor. This includes spooler data stored in a spooler job file. The PRINTREAD procedure returns one line of spooled data.
Spooler Procedure Calls Considerations returns a line of spooled data. input read-count INT:value specifies the maximum number of bytes to be read. output count-read INT:ref:1 is the number of bytes actually read. input pagenum INT:value returns one of the following: >0 PRINTREAD returns the first line on the page specified by this parameter. <0 PRINTREAD repeats the last line returned. = 0 or absent PRINTREAD returns the next sequential line.
Spooler Procedure Calls Example See the Guardian Procedure Calls Reference Manual for a description of the SETMODE functions.
Spooler Procedure Calls PRINTREADCOMMAND Procedure PRINTREADCOMMAND Procedure The PRINTREADCOMMAND procedure can be used in print and perusal processes to access spooled data and to allow print processes to communicate with the spooler supervisor. The PRINTREADCOMMAND procedure interprets the information contained in the print control buffer returned from a call to PRINTCOMPLETE (in a print process) or SPOOLEREQUEST[2] (in a perusal process).
Spooler Procedure Calls PRINTREADCOMMAND Procedure specifies the action requested by the supervisor: 0 1 2 3 4 5 6 7 8 9 = = = = = = = = = = Open device Close device Start job on device Stop job on device Resume job on device Suspend job on device Print form-alignment template on device Skip to page Skip over pages Send status of job printing on device output device INT:ref:12 specifies the particular device referred to by the control number.
Spooler Procedure Calls PRINTREADCOMMAND Procedure is the device width specified in the Spoolcom DEV WIDTH command. output skipnum INT:ref:1 returns the number of pages to skip. The meaning of this number depends on the control number: controlnum =7 (skip to page). skipnum specifies the page that should be skipped to. controlnum =8 (skip over pages). skipnum specifies the number of pages relative to the current page that should be skipped. controlnum is neither 7 nor 8.
Spooler Procedure Calls Considerations is the page size of the job being referred to if the control number is 2 (start job); otherwise, this parameter has no meaning. output batchname INT:ref:16 is the name of the batch job. output batchid INT:ref:1 is the batch number. output owner INT:ref:1 is the owner of the job. output charmap INT:ref:1 returns one of the following codes indicating which character sets are supported: -1 Device does not support MBCS characters.
Spooler Procedure Calls Example If the control number is 7, the skipnum parameter can pass directly to PRINTREAD. If the control number is 8, PRINTINFO must be called to get the current-page. skipnum must then be added to the current-page to find the page number to pass to PRINTREAD. A print process can ignore the header and truncation flags and the devwidth parameter.
Spooler Procedure Calls PRINTSTART[2] Procedure PRINTSTART[2] Procedure The PRINTSTART procedure formats the job buffer for a spooler job being started. The buffer is used in subsequent calls to PRINTREAD. PRINTSTART[2] is the same procedure with a larger buffer. error-code := PRINTSTART[2] ( job-buffer ,print-control-buffer ,data-filenum ); ! o ! i ! i returned value error-code INT returns one of the following spooler error codes: 0 Successful operation.
Spooler Procedure Calls Considerations input data-filenum INT:value is the file number of the data file containing the started job. Considerations The following considerations apply to the use of the PRINTSTART[2] procedure: In addition to containing control information for the job, the PRINTREAD procedure uses job-buffer to store a block of spooled data. PRINTSTART[2] is called once for each job started on a device. The job buffer should not be altered by the print or perusal process.
Spooler Procedure Calls PRINTSTATUS[2] Procedure PRINTSTATUS[2] Procedure The PRINTSTATUS procedure can be used in print processes to communicate with the supervisor and to send an unsolicited status message to the spooler supervisor. PRINTSTATUS[2] is the same procedure with a larger buffer.
Spooler Procedure Calls PRINTSTATUS[2] Procedure input msg-type INT:value specifies the type of message being sent, as follows: 0 = Sending status of job 1 = Error occurred on print device; previous operation was unsuccessful 2 = End of job 3 = Unable to open device 4 = Invalid operation in this state 5 = Error occurred on print device; previous operation was successful input device INT:ref:12 is the name of the device on which an error occurred.
Spooler Procedure Calls Considerations input line INT:value if present, is the current line number (from PRINTINFO). input lines-printed INT:value is the number of lines printed. Considerations The following considerations apply to the use of the PRINTSTATUS[2] procedure: PRINTSTATUS[2] should not be used by a perusal process. A print process operates with, and under the control of, the supervisor, while a perusal process operates on its own.
Spooler Procedure Calls Example Example STATUS^ERROR := PRINTSTATUS ( FILENUM^SUP , PRINT^BUFF , MSG , DEVICE , ! error , ! num copies , PAGE , ! line , NUM^LINES ); Spooler Plus Programmer’s Guide—522293-003 4-22
Spooler Procedure Calls SPOOLBATCHNAME Procedure SPOOLBATCHNAME Procedure The SPOOLBATCHNAME procedure returns the name of the batch job currently being spooled to the collector. This procedure can be used when spooling at levels 1, 2, or 3.
Spooler Procedure Calls SPOOLCONTROL Procedure SPOOLCONTROL Procedure The SPOOLCONTROL procedure is used to perform device-dependent I/O operations when the application process is spooling at level 3. If a level-3 buffer is specified in a call to SPOOLSTART, the SPOOLCONTROL procedure must be used in place of the CONTROL procedure.
Spooler Procedure Calls Considerations output bytes-written-to-buff INT:ref:1 returns the number of bytes to be checkpointed from the level-3-buff. This parameter is used by fault-tolerant applications. extended-level-3-buff input,output INT:.EXT.ref.* is the extended-level-3-buff specified in the SPOOLSTART procedure. Considerations The following considerations apply to the use of the SPOOLCONTROL procedure: If flags.
Spooler Procedure Calls SPOOLCONTROLBUF Procedure SPOOLCONTROLBUF Procedure The SPOOLCONTROLBUF procedure is used to perform device-dependent I/O operations requiring a data buffer when the application process is spooling at level 3. This procedure must be used in place of CONTROLBUF if a level-3 buffer is specified in a call to SPOOLSTART.
Spooler Procedure Calls Considerations is an array containing the control information to be sent to the print device. input count INT:value is the number of bytes of information contained in the buffer. output bytes-written-to-buff INT:ref:1 returns the number of bytes to be checkpointed from the level-3-buff. This parameter is used by fault-tolerant applications. extended-level-3-buff input,output INT:.EXT.ref.* is the extended-level-3-buff specified in the SPOOLSTART procedure.
Spooler Procedure Calls SPOOLEND Procedure SPOOLEND Procedure The SPOOLEND procedure can be used to complete a job being spooled at level 3. The SPOOLEND procedure writes any remaining data in the collection process buffer to the collector, sends the collection process a termination message, and optionally modifies the job’s attributes.
Spooler Procedure Calls <10> Considerations HOLDAFTER flag: 0 = off 1 = on <11> Reserved; must be 0 <12> Close the file <13:15> Job priority If this parameter is omitted, the attributes established by the call to SPOOLSTART are not changed. extended-level-3-buff input,output INT:.EXT.ref.* is the extended-level-3-buff specified in the SPOOLSTART procedure.
Spooler Procedure Calls SPOOLERCOMMAND Procedure SPOOLERCOMMAND Procedure The SPOOLERCOMMAND procedure is used to perform Spoolcom and Peruse operations from within applications. The SPOOLERCOMMAND procedure allows a process to send a Spoolcom command to the spooler supervisor.
Spooler Procedure Calls SPOOLERCOMMAND Procedure %14017 A job associated with a font cannot be deleted %14020 Command not valid on spooler batch job %14021%14023 Spooler batch job error code print process (NEWPROCESS error in bits <8:15>, refer to the Guardian Procedure Errors and Messages Manual) filenum-of-supervisor input INT:value is the file number of an open supervisor file. The file number is returned when the supervisor is opened.
Spooler Procedure Calls SPOOLERCOMMAND Procedure and Subcommand Parameters SPOOLERCOMMAND Procedure and Subcommand Parameters The SPOOLERCOMMAND procedure is useful to programmers who want to perform Spoolcom operations from within application programs. The Spoolcom commands that can be sent are COLLECT, DEV, JOB, LOC, PRINT, and SPOOLER. The remaining commands—EXIT, FC, HELP, and OPEN—are executed by Spoolcom, and therefore they are not related to the supervisor. Note.
Spooler Procedure Calls SPOOLERCOMMAND Procedure and Subcommand Parameters Table 4-3.
Spooler Procedure Calls SPOOLERCOMMAND Procedure and Subcommand Parameters Table 4-3.
Spooler Procedure Calls SPOOLERCOMMAND Procedure and Subcommand Parameters Table 4-4.
Spooler Procedure Calls SPOOLERCOMMAND Procedure and Subcommand Parameters Table 4-5.
Spooler Procedure Calls SPOOLERCOMMAND Procedure and Subcommand Parameters Table 4-6.
Spooler Procedure Calls SPOOLERCOMMAND Procedure and Subcommand Parameters Table 4-7.
Spooler Procedure Calls SPOOLERCOMMAND Procedure and Subcommand Parameters Table 4-8. SPOOLERCOMMAND Parameters for Spoolcom SPOOLER Spoolcom SPOOLER Subcommand subcommand-code (Fourth Parameter) subcommand-parameter (Fifth Parameter) DRAIN 114 None DUMP 157 filename (INT:12) ERRLOG 151 filename (INT:12) MGRACCESS 158 0 = off, 1 = on (INT:1) START 115 None The filename parameter can be specified as either an INT:12 or a STRING:24.
Spooler Procedure Calls Considerations Spoolcom BATCH Command Parameters To send the equivalent of a Spoolcom BATCH command, specify a file number for the filenum-of-supervisor parameter and a command-code of 8. The commandparameter in this case is the batch number, not to exceed one word in length. Find the subcommand-code and the subcommand-parameter for the Spoolcom BATCH parameters you want from Table 4-10.
Spooler Procedure Calls Example Commands not accompanied by subcommands should have code 100 as their subcommand-code (for example, creating a component with all default parameters). You must put a batch on hold by using the Spoolcom JOB HOLD command before attempting to use the Spoolcom BATCH LINK and UNLINK subcommands. Error %14017 is returned if an attempt is made to delete a job associated with a font.
Spooler Procedure Calls SPOOLEREQUEST[2] Procedure SPOOLEREQUEST[2] Procedure The SPOOLEREQUEST procedure allows a perusal process to access a spooled job outside the control of the spooler supervisor. SPOOLEREQUEST2 is the same procedure with a larger buffer.
Spooler Procedure Calls Considerations print-control-buffer INT:ref:64 (Use with SPOOLEREQUEST) INT:ref:128 (Use with SPOOLEREQUEST2) output returns a “start job” message suitable for passing to the PRINTREADCOMMAND procedure. Considerations The following considerations apply to the use of the SPOOLEREQUEST[2] procedure: Before calling the SPOOLEREQUEST[2] procedure, you must open a file to the spooler supervisor. You must specify waited I/O.
Spooler Procedure Calls SPOOLERSTATUS2 Procedure SPOOLERSTATUS2 Procedure The SPOOLERSTATUS2 procedure performs Spoolcom and Peruse operations from within applications. (SPOOLERSTATUS, an older version of this procedure that is documented in the Spooler Programmer’s Guide, is considered obsolete with Spooler Plus.) SPOOLERSTATUS2 allows a process to obtain the status of spooler components.
Spooler Procedure Calls SPOOLERSTATUS2 Procedure specifies the spooler component whose status is being sought. The range of values and their meanings are listed in Table 4-11. Table 4-11.
Spooler Procedure Calls Considerations input, output status-buffer INT:ref:128 is a 128-word buffer where the status is returned. The format of the status buffer depends on the particular command code. Considerations The following considerations apply to the use of the SPOOLERSTATUS2 procedure: Before calling the SPOOLERSTATUS2 procedure, you must open a file to the spooler supervisor. You must specify waited I/O. If %14016 is returned, call SPOOLERSTATUS2 again.
Spooler Procedure Calls Obtaining the Spooler Statistics and Status ! 6 = print process error ! (procerror) last^error, ! the last spooler error code ! recorded on the device flags; ! device flags (0=off, 1=on) ! flags. <0> = Devreset ! flags.<1:2> = Startff 00 = OFF 01 = ON 10 = OFF ! ! flags.<3> = Endff ! flags.<4:7> = DEVTYPE 0001 = SNAX LU1 0010 = SNAX LU3 0111 = 7 SUB-TYPE FOR 5515, 5516, 5518 1000 = 8 SUB-TYPE FOR 5573,5574 1001 = 9 SUB-TYPE FOR 5512 1010 = 10 SUB-TYPE FOR 5577 ! flags.
Spooler Procedure Calls Obtaining the Spooler Statistics and Status ! ! only when device is in print state. restart^interval, ! automatic device restart ! specification charmap, ! multibyte character set ! translation flag, where ! -1 = no translation ! 2 = IBMKANJIKANA ! 5 = JEFKANJIKANA ! 8 = JISKANJIKANA devflagx; ! Optional Device Flag ! (0 = OFF, 1 = ON) ! devflagx.<1> = Prexlate ! DEVFLAGX.
Spooler Procedure Calls Obtaining the Spooler Statistics and Status The values that can be returned for the field device.devflagx.<1> are as follows: 0 specifies that the device is not in pretranslate mode. 1 specifies that the device is in pretranslate mode. All other bits in devflagx are reserved for use by the spooler.
Spooler Procedure Calls Obtaining the Spooler Statistics and Status END; STRING collector^process^name [0:5]; ! process name of collector ! used to create this job INT (32) units^allocated; INT gmom^jobid; INT (32) max^lines; INT (32) max^pages; INT batch^name [0:15], batch^id; INT gmom^crtpid [0:3] END; ! ! ! ! ! ! ! ! ! ! ! number of units allocated by collector to the job job id of GMOM maximum number of lines allocated to the job maximum number of pages allocated to the job batch name that includes
Spooler Procedure Calls Obtaining the Spooler Statistics and Status If pages is greater than 0, then all jobs with more than the number of pages specified are returned. Setting pages to 0 allows all jobs to be returned. All jobs that have closing timestamps less than time^closed and greater than time^opened are returned. Open jobs have infinite closing timestamps. If collector^process^name is nonblank, only jobs collected by the specified collector are returned.
Spooler Procedure Calls Obtaining the Spooler Statistics and Status Obtaining the Status of a Collector (Command Code 18) To obtain the status of a collector, set the command-code parameter of SPOOLERSTATUS2 to 18 and pass a 128-word status buffer to SPOOLERSTATUS2.
Spooler Procedure Calls Obtaining the Spooler Statistics and Status Obtaining the Status of a Print Process (Command Code 5) To obtain the status of a print process, set the command-code parameter of SPOOLERSTATUS2 to 5 and pass a 128-word status buffer to SPOOLERSTATUS2 The following STRUCT shows the fields of the buffer: STRUCT print; BEGIN STRING process^name [0:5]; INT state, flags, last^error; ! ! ! ! ! ! ! ! ! ! ! ! ! ! print process name, blank-filled print process state: 1 = Active 2 = Dormant
Spooler Procedure Calls Obtaining the Spooler Statistics and Status Obtaining the Status of the Spooler (Command Code 19) To obtain the status of the spooler, set the command-code parameter of SPOOLERSTATUS2 to 19, pass a 128-word status buffer to SPOOLERSTATUS2, and set bit 15 of the scan-type parameter to 0. Because the file number specifies the spooler with which SPOOLERSTATUS2 is communicating, none of the status buffer fields needs to be filled.
Spooler Procedure Calls Obtaining the Spooler Statistics and Status INT current^line; INT (32) pages; INT (32) total^lines; ! reserved for use by HP ! number of pages in job ! number of lines in job STRING form^name [0:15]; INT owner^ID; ! job form name, blank-filled ! owner^ID.<0:7> = owner's group ID ! owner^ID.
Spooler Procedure Calls Obtaining the Spooler Statistics and Status Figure 4-1. Spooler Ready List $LPA $LPB $LPC 1 Job 234 1 Job 3455 1 Job 1656 2 Job 2874 2 Job 1111 2 Job 4243 3 Job 32 3 Job 234 3 Job 234 4 Job 645 4 Job 2233 5 Job 627 VST008.vsd Obtaining the Status of Occurrences of a Job (Command Code 21) To obtain the status of an occurrence of a particular job, set the command-code parameter of SPOOLERSTATUS2 to 21 and bit 15 of the scan-type parameter to 1.
Spooler Procedure Calls Obtaining the Spooler Statistics and Status Obtaining a Cross-Reference (Command Codes 10, 11, and 12) To obtain a cross-reference of locations, devices, or print processes, set the command-code parameter of SPOOLERSTATUS2 for the type of cross-reference you want and pass a 128-word cross-reference buffer to SPOOLERSTATUS2.
Spooler Procedure Calls Obtaining the Spooler Statistics and Status INT job; END; ! job associated with the font If you want the status of all fonts in the spooler subsystem, fill the font.fontname field with blanks and set bit 15 of the scan-type parameter to 1. The first call will return the status of the font whose name comes first alphabetically. Continue calling SPOOLERSTATUS until it returns error %14006 (end of entries). If you want the status of a particular font, fill the font.
Spooler Procedure Calls Obtaining the Spooler Statistics and Status Obtaining High-Level Spooler Statistics (Command Code 24) To obtain high-level spooler statistics, set the command-code parameter of SPOOLERSTATUS2 to 24 and pass a 128-word status buffer to SPOOLERSTATUS2.
Spooler Procedure Calls Obtaining the Spooler Statistics and Status Each call to SPOOLERSTATUS2 will return data for up to 19 jobs. More than one call may be required to obtain all the LISTOPENS information. The status word returned will indicate whether all the data has been obtained. If the status word returned is 0, then there may be more data to be retrieved; if the status word is 1, then all the LISTOPENS data has been retrieved.
Spooler Procedure Calls SPOOLJOBNUM Procedure SPOOLJOBNUM Procedure The SPOOLJOBNUM procedure returns the job number of the job currently being spooled to the collector. This procedure can be used when spooling at level 1, 2, or 3.
Spooler Procedure Calls Example Some file-system errors have special significance to a process sending data to a collector; many of these errors are described in Appendix C, Spooler-Related Errors. All of the file-system errors are listed in the Guardian Procedure Errors and Messages Manual.
Spooler Procedure Calls SPOOLSETMODE Procedure SPOOLSETMODE Procedure The SPOOLSETMODE procedure is used to set device-dependent functions when an application process is using the spooler interface procedures. This procedure must be used in place of the SETMODE procedure if a level-3 buffer is specified in a call to SPOOLSTART.
Spooler Procedure Calls Considerations is a parameter for the specified SETMODE function (see the Guardian Procedure Calls Reference Manual). output bytes-written-to-buff INT:ref:1 returns the number of bytes to be checkpointed from the level-3-buff. This parameter is used by fault-tolerant applications. extended-level-3-buff input,output INT:.EXT.ref.* is the extended-level-3-buff specified in the SPOOLSTART procedure.
Spooler Procedure Calls SPOOLSTART Procedure SPOOLSTART Procedure The SPOOLSTART procedure formats a spooler buffer suitable for passing to other spooler interface procedures. It is used to specify job attributes, establish a level-2 or level-3 spooling session with a spooler collector, or establish a level-3 spooling session to a spooler job file.
Spooler Procedure Calls SPOOLSTART Procedure output level-3-buff INT:ref:512 indicates that the spooler interface procedures are used to send data to the collector. The data is put into a buffer. The address of this buffer is returned by the SPOOLSTART procedure and must be passed to other interface procedures. The buffer is initialized and its address returned as a result of this call. The buffer is located in the data stack and is limited to 512 bytes.
Spooler Procedure Calls SPOOLSTART Procedure specifies certain attributes of the job.
Spooler Procedure Calls Considerations file-name input, output INT:ref:12 specifies the file name of the spooler collector or spooler job file to be opened for the spooling session. input, output filenum INT:ref:1 is an alternative parameter to filenum-of-collector. See Considerations on page 4-68 for more information. extended-level-3-buff output INT:.EXT.ref.* indicates that the spooler interface procedures are used to send data to the collector. The data is put into a buffer.
Spooler Procedure Calls Considerations Pass the three parameters filenum-of-collector, file-name, and filenum in one of the following ways: If the file is already open, pass the file number as either filenum-ofcollector or filenum. You can pass file-name but it is ignored. If the file is not open and the caller does not need to know the file number, pass file-name. The filenum-of-collector and filenum parameters can be omitted, or one of them can be passed containing the value -1.
Spooler Procedure Calls SPOOLWRITE Procedure SPOOLWRITE Procedure The SPOOLWRITE procedure is used to write to a collector when the application process is spooling at level 3. The SPOOLWRITE procedure compresses and blocks data into the level-3 buffer and, when the buffer is full, writes the buffer to the collector or a spooler job file. This procedure must be used in place of the WRITE[X] procedure if a level-3 buffer is specified in a call to SPOOLSTART.
Spooler Procedure Calls Considerations output bytes-written-to-buff INT:ref:* returns the number of bytes in the level-3-buff to be checkpointed. extended-level-3-buff input,output INT:.EXT.ref.* is the extended-level-3-buff specified in the SPOOLSTART procedure. Considerations The following considerations apply to the use of the SPOOLWRITE procedure: Each call to SPOOLWRITE causes print-line to be written to the level-3buff.
Spooler Procedure Calls Example Spooler Plus Programmer’s Guide—522293-003 4-72
A Sample Print Process This appendix shows an example of a print process. It includes a description of the program and the code. The example has been kept as simple as possible in the interest of clarity. Simplifications include the following: Only one job at a time can be printed. No form alignment is performed. The record size of all devices is assumed to be 132. The truncation flag is ignored. The print process parameter and device parameter are not used.
Sample Print Process .s^out^buf := @out^buf '<<' 1, ! string pointer to "out^buf" .s^data^line := @data^line '<<' 1; ! string pointer to ! "data^line" STRUCT .
Sample Print Process FORWARD; PROC close^dev (device); INT .device; FORWARD; PROC start^job (device, data^file^name, job^num, location, formname, reportname, flags, params, dev^width, page^size); INT .device, .data^file^name, job^num, .location, .formname, .reportname, flags, params, dev^width, page^size; FORWARD; PROC init^job; FORWARD; PROC stop^job (device, error); INT .device, error; FORWARD; PROC req^stop^job (device); INT .device; FORWARD; PROC resume^job (device); INT .
Sample Print Process LITERAL missing^parameter = 29; INT err := 0, flags^ := 0; !---Beginning of code-------------------------------------------------IF NOT ($PARAM (fname) AND $PARAM (fnum)) THEN RETURN missing^parameter; IF $PARAM (flags) THEN flags^ := flags; CALL OPEN (fname, fnum, flags^); IF < THEN CALL FILEINFO (-1, err); RETURN err; END; ! *===================================================================* !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! procedure name: WRIT
Sample Print Process ! ! ! ! ! ! ! ! ! ! !- - - - - - - that the supervisor file number and print control buffer are not required. Instead, this procedure simply assumes that these are "supv^fnum" and "p^buf", respectively. Like PRINTSTATUS, some parameters of this procedure are either required or optional depending on the message type. However, rather than checking for required parameters, it is assumed that these parameters have been correctly supplied by the print process.
Sample Print Process ! *===================================================================* !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! procedure name: BUILD^HEADER ! parameters: none ! description: This procedure builds the job page banner, which in ! general is entirely application-defined.
Sample Print Process ptr[20] := ptr[80] := "*"; ptr[30] ':=' "DATE: "; CALL NUMOUT ( ptr[37], time^array[2], 10, 2 ); ptr[40] ':=' months [3 * ( time^array[1] - 1 )] FOR 3; CALL NUMOUT ( ptr[44], time^array, 10, 2 ); error := writefile (dev^fnum,header[2].line,60); IF error THEN CALL ABEND; header^index := header^index + 1; RETURN; END; IF header^index = 5 THEN BEGIN @ptr := @header[3].line '<<' 1; ptr[20] := ptr[80] := "*"; error := writefile (dev^fnum,header[3].
Sample Print Process RETURN; END; IF header^index = 10 THEN BEGIN @ptr := @header[8].line '<<' 1; ptr[20] := ptr[80] := "*"; ptr[30] ':=' "LOCATION NAME: " & locations FOR 8; ptr[54] := "."; ptr[55] ':=' locations[8] FOR 8; error := writefile (dev^fnum,header[8].line,60); IF error THEN CALL ABEND; header^index := header^index + 1; RETURN; END; IF header^index = 11 THEN BEGIN @ptr := @header[9].line '<<' 1; ptr[20] := ptr[80] := "*"; error := writefile (dev^fnum,header[9].
Sample Print Process END; IF header^index = 16 THEN BEGIN @ptr := @header[14].line '<<' 1; ptr[20] := "*"; ptr[21] ':=' ptr[20] FOR 60; error := writefile (dev^fnum,header[14].
Sample Print Process ! ! ! ! !- - - - - - - control is passed back to MAIN^LOOP. When the return code value is <> 0 (negative return code), the spooler supervisor is notified of the error and the job will be terminated. - - - - - - - - - - - - - - - - - - - - - - - - - - - - PROC read^and^print (page^num, device); INT page^num, .
Sample Print Process !-12001- !-12002- !-12003! ! ! ! !-12004! ! ! BEGIN CALL stop^job (device, 0); RETURN; END; end of copy found BEGIN header^index := dev.flags.<13>; error := 0; CALL SETMODE (dev^fnum, 28, 0); goto next^copy; END; data file is bad BEGIN CALL stop^job (device, error); END; CONTROL found BEGIN Issue CONTROL to IOP print process--issue only forms control operations - any others are ignored.
Sample Print Process wait^needed := 0; ! SETMODE is a waited ! operation END; END; OTHERWISE BEGIN END; ! End of error case END; END ELSE ! Successful PRINTREAD, write data to device BEGIN ! If the DEV WIDTH is <0, allow any size of IO ! up to a limit set by the literal max^read^count. ! Otherwise truncate the IO so that we don't ! send more than WIDTH chars to the device IF dev.width < 0 THEN write^count := count^read ELSE write^count := $MIN ( dev.
Sample Print Process error) ELSE CALL tell^super (end^job, device, error); RETURN; END; ! *===================================================================* PROC init^job; BEGIN !---Beginning of code-------------------------------------------------data^file^fnum := 0; busy^flag := 0; suspend := 0; suspended := 0; msg^type := 0; successful^op := 0; end^of^job^flag := 0; header^index := 0; END; ! *===================================================================* ! CONTROL NUMBER = 0: OPEN DEVICE !- - -
Sample Print Process PROC close^dev (device); INT .
Sample Print Process ! procedure should move information contained in the ! calling parameters into a device table. !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PROC start^job (device, data^file^name, job^num, location, formname, reportname, flags, params, dev^width, page^size); INT .device, .data^file^name, job^num, .location, .formname, .
Sample Print Process ! ! ! ! ! ! ! ! ! ! !- - - - - - - printing a job, the spooler supervisor is notified that the stop job command is invalid. If the print process is currently printing a job, two CANCEL requests are issued to cancel any outstanding requests. The second request is most likely not needed; it is added as extra insurance. Control is passed to the procedure STOP^JOB to complete the tasks of stopping the current job.
Sample Print Process suspended := 0; CALL read^and^print (next^line, device); END; END; ! *===================================================================* ! CONTROL NUMBER = 5: SUSPEND JOB !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! procedure name: SUSPEND^JOB ! parameters: DEVICE - name of device where the job is currently ! printing. ! description: This procedure services the spooler supervisor command ! to suspend the printing of the current job.
Sample Print Process IF busy^flag THEN CALL tell^super (invalid^operation, device, job^running) ELSE BEGIN IF not dev^fnum THEN CALL open^dev (device); IF not dev^fnum THEN ! Open failed RETURN; data^line ':=' "....+....1....+....2....+....3....+....4....+....5....+....6" &"....+....7....+....8....+....9....+....0....+....1....+....
Sample Print Process BEGIN CALL CANCEL (dev^fnum); header^index := 0; CALL read^and^print (skip^num, device); END; RETURN; END; ! *===================================================================* ! CONTROL NUMBER = 8: SKIP PAGES !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! procedure name: SKIP^PAGE ! parameters: SKIP^NUM - number of pages to be skipped. ! DEVICE - name of device where job is printing.
Sample Print Process ! ! ! ! !- - - - - - - is notified that the status command is invalid. The spooler procedure PRINTINFO is called to fetch information about the current print job. - - - - - - - - - - - - - - - - - - - - - - - - - - - - PROC send^status (device); INT .
Sample Print Process ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !- - - - - - - procedure to process the spooler supervisor command. DEVICE WRITE COMPLETIONS: ERROR: When the device write completes in error, the spooler supervisor is notified. This notification also indicates whether the previous device write was successful. This information is used for retryable type errors. The "suspend" flag is set to true to indicate that the current print job has been suspended.
Sample Print Process ! ! ! ! ! ! ! ! ! ! BEGIN IF error THEN BEGIN suspend := 1; suspended := 1; msg^type := IF successful^op THEN dev^error^5 ELSE dev^error^1; call tell^super (msg^type, device, device^file^error + error); successful^op := 0; END ELSE BEGIN successful^op := 1; IF busy^flag AND NOT suspended THEN CALL read^and^print (next^line, device); IF end^of^job^flag THEN CALL stop^job (device, error); END; END; IF fnum = supv^fnum THEN BEGIN IF PRINTCOMPLETE (supv^fnum, p^buf) THEN CALL ABEND; IF
Sample Print Process CALL send^status (device); END; ! End of control case END; END; ! End of WHILE 1 loop END; ! *===================================================================* ! main procedure !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! procedure name: SAMPLE^PRINT^PROCESS ! parameters: none ! description: This procedure opens $RECEIVE and reads the Startup ! message. The spooler supervisor process name is ! extracted from the Startup message and opened.
Sample Print Process Spooler Plus Programmer’s Guide—522293-003 A-24
B Sample Perusal Process This appendix shows a sample perusal process. This sample process functions in much the same way as the listing section of the PERUSE program. The sections of code concerned with taking commands from the terminal and listing errors are not included because they are not actually related to the perusal process operation. Note. The program presented in this appendix can be compiled and run as presented.
Sample Perusal Process ! This structure is used to get the status of jobs in a device queue STRUCT .job^status; BEGIN INT state, device^name [0:15], sequence^number, job^number; STRUCT location; BEGIN STRING group [0:7], destination [0:7]; END; INT copies, pages, reserved, total^lines; STRING form^name [0:15]; INT owner^id; END; ?page ! This structure is used to get the status of jobs in a device queue STRUCT .
Sample Perusal Process BEGIN INT msgcode; STRUCT default; BEGIN INT volume[0:3], subvolume[0:3]; END; STRUCT infile; BEGIN INT volume[0:3], subvolume[0:3], dname [0:3]; END; STRUCT outfile; BEGIN INT volume[0:3], subvolume[0:3], dname [0:3]; END; STRING param [0:24]; END; ?page ! Global declarations INT .termname [0:11] := [ 12 * [" .recname [0:11] := "$RECEIVE .supername [0:11] := "$SPLS .
Sample Perusal Process ? spoolercommand, spoolerstatus, open, write, read, writeread, ? creatoraccessid, stop, myterm) ?list ?page ! This procedure handles errors from the spooler utility procedures ! No error recovery or diagnostic message is displayed; only the error ! number is listed. A finished program would have error recovery, and ! a meaningful diagnostic message would be displayed. PROC err (errcode); INT errcode; BEGIN STRING err^line [0:39] := ["error^code = ", 26 * [" "]]; INT .
Sample Perusal Process ! This procedure breaks a string at a period or a space and puts ! the characters up to a period or a space in the second string INT PROC breakstr (str, index, dest); STRING .str, .dest; INT index; BEGIN INT i,ret; i := 0; ! Check for invalid characters or a string longer than 8 characters.
Sample Perusal Process .
Sample Perusal Process IF count = 0 THEN hold := 1 ELSE IF str[0] = "O" OR str[0] BEGIN IF str[1] = "N" OR str[1] = ELSE IF str[1] = "F" OR str[1] = str[2] = "F" OR str[2] = ELSE CALL error (2); END END; = "o" THEN "n" THEN hold := 1 "f" AND "f" THEN hold := 0 !3 JOB! BEGIN IF count = 0 THEN jobn := 0 ELSE BEGIN CALL NUMIN (str,jobn, 10, status); IF status <> 0 THEN CALL error(2) ELSE IF jobn > 4095 OR jobn < 1 THEN CALL error (2); END; END; !4 DEV! BEGIN devcnt:= 0; device[0] := " "; device[1] ':=' d
Sample Perusal Process ELSE BEGIN number := (number - page) + 1; IF number < 1 THEN CALL error(2); END; END ELSE number := 1; END; END; !6 EXIT! OTHERWISE ; END; END; END; END; ?page ! loc changes the location of the current job PROC loc (location); INT .location; BEGIN INT error^code; job.
Sample Perusal Process ?page ! jobchange changes the current job to the one specified in the ! parameter. If jobnum is not owned by the current user, then no change ! is made. PROC jobchange (jobnum); INT jobnum; BEGIN INT error^code, temp; ! Get the status of the specified job job.number := jobnum; error^code := SPOOLERSTATUS(supernum, 2, 0, job); IF error^code <> 0 THEN BEGIN CALL err(error^code); ! Error handling END ELSE BEGIN ! If owner ID matches, then make the specified job the current job. IF job.
Sample Perusal Process line[0] := " "; line[1] ':=' line[0] FOR 79; line[2] ':=' "JOB"; line[8] ':=' "OWNER"; line[17] ':=' "PAGES"; line[24] ':=' "WAIT"; line[35] ':=' "FORM"; CALL WRITE (termnum, iline, 0); CALL WRITE (termnum, iline, 80); ! Get and display the status of the jobs waiting to print on the ! device job^status.device^name ':=' device FOR 16; job^status.
Sample Perusal Process BEGIN line[j] := "."; j := j + 1; END; line [j] := dev^stat.name[i].<0:7>; j := j +1; END; IF dev^stat.name[i].<8:15> <> " " THEN BEGIN line [j] := dev^stat.name[i].<8:15>; j := j+1; END; END; CASE dev^stat.state OF BEGIN !0! call err(dev^stat.state); !1! line[36] ':=' "WAITING"; !2! line[36] ':=' "PRINTING"; !3! line[36] ':=' "SUSPENDED"; !4! line[36] ':=' "DEVERROR"; !5! line[36] ':=' "OFFLINE"; !6! line[36] ':=' "PROCERROR"; OTHERWISE CALL err (dev^stat.state); END; IF dev^stat.
Sample Perusal Process line[0] := " "; line[1] ':=' line[0] FOR 79; IF job.number = current^job THEN line[1] := "J"; CALL NUMOUT(line[2], job.number, 10, 4); CASE job.state OF BEGIN !0! ; !1! line[8] ':=' "OPEN"; !2! line[8] ':=' "READY"; !3! line[8] ':=' "HOLD"; !4! line[8] ':=' "PRINT"; END; CALL NUMOUT(line[15], job.pages, 10, 5); CALL NUMOUT(line[22], job.copies, 10, 5); temp := 0; temp := job.flags.<13:15>; CALL NUMOUT(line[30], temp, 10, 1); IF job.state = 1 and job.flags.
Sample Perusal Process END ELSE BEGIN error^code := PRINTREADCOMMAND(message, ,,,,,,datafile); IF error^code <> 0 THEN BEGIN CALL err(error^code); ! Error handling END ELSE BEGIN CALL OPEN (datafile,datanum,%2000,1); IF <> THEN BEGIN ! Error handling CALL filerr(-1); END ELSE BEGIN error^code := PRINTSTART(jobbuff, message,datanum); IF error^code <> 0 THEN BEGIN CALL err(error^code); ! Error handling END ELSE list^job := current^job; END; END; END; END; ?page ! LIST performs the listing operation.
Sample Perusal Process BEGIN WHILE ((page + number) > current^page) AND (error^code = 0) DO BEGIN CALL WRITE(termnum, dline, 80); error^code := STRIPLINES(jobbuff, dline, 900, 0); IF error^code <> 0 AND error^code <> %14002 THEN BEGIN ! Error handling CALL err(error^code); END; error^code := PRINTINFO(jobbuff, , current^page); IF error^code <> 0 AND error^code <> %14002 THEN BEGIN ! Error handling CALL err(error^code); END END; END; END; END ELSE ! request for lines not pages BEGIN FOR i := 1 to lines DO B
Sample Perusal Process WHILE error^code = 0 DO BEGIN IF userid = job.owner^id THEN BEGIN I :=0; WHILE job.time^opened[i] = timestamp[i] DO I:=i+1; IF job.time^opened[i] > timestamp[i] THEN BEGIN current^job := job.number; timestamp ':=' job.time^opened FOR 3; END; END; job.number.<0> := 1; job.
Sample Perusal Process Spooler Plus Programmer’s Guide—522293-003 B-16
C Spooler-Related Errors This appendix explains the error codes returned by the spooler interface, print, and utility procedures. These codes are listed numerically by type. Each spooler procedure is a type INT function that returns an octal spooler error code indicating its outcome.
Spooler-Related Errors Interface Errors Recovery. Refer to the information on file-system errors in the Guardian Procedure Errors and Messages Manual for corrective action for the error number indicated in bits <8:15>. 4096 (%10000) Cause. A parameter is missing. Effect. The spooler ignores the request. Recovery. Correct the syntax and reenter the command. 4097 (%10001) Cause. The content of a parameter is wrong, or both filenum and filenum-tocollector were specified (only one can be specified).
Spooler-Related Errors File-System Errors Effect. The HP NonStop operating system returns a -1 as the file number on a failed open. Recovery. Correct your program to verify that the collector has been opened successfully. File-System Errors The following file-system error codes have special significance to a process sending data to a collector.
Spooler-Related Errors 28 (%34) File-System Errors NUMBER OF OUTSTANDING NOWAIT OPERATIONS WOULD EXCEED THAT SPECIFIED Cause. The collector was opened with an illegal sync or nowait depth. Effect. The open is ignored. Recovery. Make sure that the sync depth is less than or equal to 32 and that bits <12:15> of the OPEN flags parameter contain a value less than or equal to 1. 44 (%54) DISK DIRECTORY IS FULL; DCT IS FULL Cause.
Spooler-Related Errors 66 File-System Errors (%102) DEVICE DOWNED, LIU NOT YET DOWNLOADED, OR HARD FAILURE OCCURRED ON CONTROLLER Cause. The collector is not accepting open requests. This error can occur for the following reasons: The system operator brought down the specified device. A hard error occurred on the device controller. The spooler collector process sent a spooled job to a nonmirrored disk. Both halves of a mirrored disk are down. Effect.
Spooler-Related Errors Spooler Utility Errors Recovery. Load more paper, close the bail, or replace the ribbon as needed. 140 (%214) MODEM ERROR (COMMUNICATION LINK NOT YET ESTABLISHED, MODEM FAILURE, MOMENTARY LOSS OF CARRIER, OR DISCONNECT) Cause. A modem error occurred.
Spooler-Related Errors Spooler Utility Errors Recovery. Correct the syntax and reenter the command. 6144 (%14000) Cause. An invalid command was issued. Effect. The spooler ignores your request. Recovery. Correct the command code and reenter the command. 6145 (%14001) Cause. A command parameter is missing. Effect. The spooler ignores your request. Recovery. Correct the command syntax and reenter the command. 6146 (%14002) Cause. A command parameter is in error. Effect.
Spooler-Related Errors Spooler Utility Errors Recovery. Correct the parameter value and reenter the command. 6150 (%14006) Cause. The program reached the end of the SPOOLERSTATUS entries. Effect. The spooler ignores your request. Recovery. If this value is expected, no action is needed. Otherwise, correct the program so it handles end-of-entries. 6151 (%14007) Cause. SPOOLERSTATUS or SPOOLEREQUEST could not find an entry. Effect. The spooler ignores your request. Recovery.
Spooler-Related Errors 6155 Spooler Utility Errors (%14013) Cause. Because the entry is in use, it cannot be deleted. Effect. The spooler ignores your request. Recovery. Wait until the entry becomes available and then delete it. 6156 (%14014) Cause. The attempted request failed because of a security violation. Effect. The spooler ignores your request. Recovery. To execute the request, log on as an authorized user with execute access to the Spoolcom program. 6157 (%14015) Cause.
Spooler-Related Errors Print Procedure Errors Effect. The operation is ignored. Recovery. Perform the operation on the spooler batch job, or unlink the spooler job from the spooler batch job and retry the operation. 6161 (%14021) Cause. An attempt was made to link a spooler job whose attributes (owner, form, device, and gmom-crtpid-jobid) do not match those of the spooler batch job. Effect. The operation is ignored. Recovery.
Spooler-Related Errors Print Procedure Errors Error codes returned by PRINTREAD that are not listed below are fatal errors. In such cases, terminate the job and send the error to the supervisor process. Use a negative pagenum parameter in the call to PRINTREAD if you want PRINTREAD to return the number of the line where a WRITE[X] to a device failed.
Spooler-Related Errors Print Procedure Errors Recovery. Refer to the information on file-system errors in the Guardian Procedure Errors and Messages Manual for corrective action for the error number indicated in bits <8:15>. 2560-2815 (%5000 - %5377) Cause. There was a file-system error on a file to the print process. Effect. The spooler ignores your request. Recovery.
Spooler-Related Errors Print Procedure Errors Recovery. A print procedure can choose to either print a header or do a top-of-form when an end-of-copy indication is returned. 5122 (%12002) Cause. A print procedure encountered an invalid data file. The data file from which PRINTREAD is attempting to read data does not contain the correct job. A perusal process can receive this error from the PRINTREAD procedure if the job it is reading is deleted during the read. Effect. There is no effect.
Spooler-Related Errors 5125 Print Procedure Errors (%12005) Cause. The data line contained a file-system CONTROLBUF operation. Effect. If this error code is returned by the PRINTREAD procedure, the data line contains a file-system CONTROLBUF message for the print device. The format of the CONTROLBUF message is data-line [0] = operation data-line [1] = buffer address data-line [2] = count operation Recovery.
Spooler-Related Errors Print Procedure Errors If the error occurs after you have stopped and restarted the print process, shut down the spooler and then warmstart it. 5635 (%13003) Cause. The print process received a request from the supervisor to perform an action on a device that is busy. Effect. The spooler takes the device in question offline. If the error occurs before the job has finished printing, the job remains in the spooler print queue.
Spooler-Related Errors Print Procedure Errors Spooler Plus Programmer’s Guide—522293-003 C-16
Index A Abend See Abnormal termination Abnormal termination collector 1-12 job 1-10, 3-7 Accessing spooled data 4-9 Active state collector 1-12 print process 1-14 spooler 1-8 Attributes, job 1-23, 1-26 B BACKUP subcommand, SPOOLCOM COLLECT 1-11, 4-36 BACKUP subcommand, SPOOLCOM PRINT 1-13, 4-37 Batch job name, obtaining current 4-23 Batch jobs 1-26/1-28 BATCHNAME subcommand, SPOOLCOM JOB 1-23 Batch, obtaining status of 4-58 Broadcast location 1-22 BROADCAST subcommand, SPOOLCOM LOC 1-22, 4-35 Buffer overfl
Index E Disk files maintained by spooler 1-6 Dormant state collector 1-12 print process 1-14 spooler 1-8 Drain state collector 1-12 spooler 1-8 E ERRLOG command, SPOOLCOM SPOOLER 1-15 Error codes file-system errors C-3/C-6 print procedure errors C-10/C-15 spooler interface errors C-1/C-3 spooler utility errors C-6/C-10 Error log file 1-15, 1-20 Error state collector 1-12 Errors device 3-7 job number 0 1-25 messages to supervisor 3-6 PRINTREAD 3-7 Exclusive device 1-14, 1-21 EXCLUSIVE subcommand, SPOOLCOM
Index J J Job 1-23/1-26 attributes 1-23 controlling 1-26 destination 1-22 key attributes 1-26 number 0 1-25 numbers 1-25, 4-61 obtaining status of 4-49, 4-54, 4-56 occurrences 1-25, 4-56 routing 1-25 states 1-10, 1-24/1-25 Job buffer, formatting for a spooler job 4-17 Job numbers, for spooled jobs 4-61 JOBID job attribute 1-26 Level-3 spooling 2-2, 2-25/2-35 COBOL 2-14 data buffer for 4-65 establishing session 4-65 example 2-10/2-13, 2-25/2-35 nonzero sync depth 2-31/2-35 zero sync depth 2-27/2-30 LOC su
Index P OWNER subcommand, SPOOLCOM JOB 1-23 Ownership, device 1-17 P PAGESIZE subcommand, SPOOLCOM COLLECT 1-11 PAGESIZE subcommand, SPOOLCOM JOB 1-23 PARM subcommand, SPOOLCOM DEV 1-17 PARM subcommand, SPOOLCOM PRINT 1-13 Perusal process 3-1, 3-9/3-11 accessing a spooled job 4-42 basic outline of 3-10 reading spooled data 4-12 sample B-1/B-15 writing 3-9 PERUSE 1-3 PERUSE operations, in a program 4-30 Physical destination 1-22 PRI subcommand, SPOOLCOM COLLECT 1-11 PRI subcommand, SPOOLCOM PRINT 1-13 Pri
Index Q Q Queues, device 1-21, 4-55 R Ready state job 1-25 REPORT subcommand, SPOOLCOM JOB 1-23 RESTART subcommand, SPOOLCOM DEV 1-17 RETRY subcommand, SPOOLCOM DEV 1-17 Routing structure 1-22/1-23 S SELPRI subcommand, SPOOLCOM JOB 1-23 Sessions, establishing spooling 4-65 SETMODE procedure 1-10, 2-4 Sharing a device 1-21 SPEED subcommand, SPOOLCOM DEV 1-17 SPOOLBATCHNAME procedure 4-23 SPOOLCOM 1-4 SPOOLCOM operations BATCH 4-40 COLLECT 4-36 DEV 4-32 FONT 4-39 JOB 4-34 LOC 4-35 PRINT 4-37 SPOOLER 4-38
Index S Spooler procedure functions accessing a spooled job 4-42 communicating with a print process 4-3 completing a job 4-28 establishing a spooling session 4-65 obtaining number of spooled job 4-61 obtaining status of a spooler component 4-44 obtaining status of spooler components 4-44 performing device-dependent I/O 4-24 PERUSE operations 4-30 SPOOLCOM operations 4-30 performing device-dependent I/O 4-24, 4-26, 4-63 writing to the collector 4-70 Spooler procedures PRINTCOMPLETE[2] 4-3 PRINTINFO 4-5 PRI
Index T Status, obtaining of a batch 4-58 of a collector 4-52 of a font 4-57 of a location 4-51 of a print process 4-53 of jobs at a location 4-56 of jobs in a device queue 4-55 of jobs waiting to print 4-54 of occurrences of a job 4-56 of the spooler 4-54 STOP command 1-8, 1-16 Supervisor See Spooler supervisor Suspended state, device 1-20 Sync depth 2-17 Special Characters $SYSTEM.SYSTEM.CSPOOL 1-10 $SYSTEM.SYSTEM.EXTDECS0 2-2, 3-3 $SYSTEM.SYSTEM.