HP 3000 Manuals

The Print Spool File Utility (PRINTSPF) [ Native Mode Spooler Reference Manual ] MPE/iX 5.0 Documentation


Native Mode Spooler Reference Manual

The Print Spool File Utility (PRINTSPF) 

The print spool file utility (PRINTSPF) displays both the data and the
special overhead area of each record of a spool file.  The syntax of
PRINTSPF is similar to that of the MPE/iX PRINT command.  You can use
PRINTSPF to print ranges of records (both absolute and relative to the
EOF) and to display the record number of each record.

Although the primary purpose of PRINTSPF is to display formatted spool
file records, you may use it to display other file types as well.  If you
use PRINTSPF to display a file that is not a spool file, it displays in
the same manner as the PRINT command.

To stop the display, use CTRL Y.


NOTE Using CTRL Y to stop the display also terminates PRINTSPF and returns you to the CI prompt. You must start PRINTSPF again in order to resume the display.
Only users with SM capability can display private spool files.
NOTE The PRINTSPF utility is in PUB.SYS. Make sure that PUB.SYS is in your search path before using PRINTSPF. To add PUB.SYS to your search path, enter: SETVAR HPPATH HPPATH+",PUB.SYS" To view your search path, enter: SHOWVAR HPPATH
The syntax for PRINTSPF is shown below: PRINTSPF filename or PRINTSPF "[FILE=] filename [[;START=]startrec] [[;END=]endrec] [[;WIDTH=]linewidth] [;NUM]" The second form of the PRINTSPF syntax follows the more flexible MPE/iX command line syntax. Refer to the MPE/iX Commands Reference Manual (32650-90003). When more than one token is specified, the double quotes are required. Parameter definitions filename Actual name of the file to be printed to $STDLIST. The system ignores file equations unless an asterisk (*) precedes the file name, indicating a backreference. If the file name is of the form Innnn or Onnnn, then PRINTSPF searches the current logon directory for the spool file first. If it does not find the file there, PRINTSPF then searches IN.HPSPOOL for Innnn or OUT.HPSPOOL for Onnnn. This searching procedure is done only if you do not qualify the file name with a group or account name. startrec Specifies the record number of the first file record to be displayed. A positive startrec is relative to one. A negative startrec is relative to the end-of-file. For example, startrec of -5 indicates the fifth record from the end of the file. Zero is changed to one. The default is the first record of the file. endrec Specifies the last record of the file to be displayed. A positive endrec is relative to one. A negative endrec is relative to the end-of-file. For example, endrec of -5 indicates the fifth record from the end of file. Zero is changed to one. The default is the last record in the file. linewidth Specifies the number of characters of the formatted record to display on each line. The default is the record size of $STDLIST minus one. If the line contains more characters than linewidth, the line is truncated. NUM Specifies numbering the displayed lines. The numbers appear before the displayed lines. The number displayed is the actual record number, relative to one, of each displayed line. The default is not to display record numbers. Output format There are five types of spool file records: open, write, close, control, and device control. For each of these record types, PRINTSPF displays a line of formatted data. The following are the formats for each type of record. OPEN OP P1=$xxxx P2=$xxxx [BUF/#llll= aaa...a] where xxxx are hex values for P1 and P2, llll is the buffer length in decimal, and aaa...a is the ASCII contents (forms message) of the buffer. CLOSE CL P1=$xxxx P2=$xxxx where xxxx are the hex values for P1 and P2. WRITE WR P1=$xxxx P2=$xxxx [CC=%cc] [BUF/#llll=aaa...a] where xxxx are the hex values for P1 and P2, cc is the octal value of the carriage control, llll is the buffer length in decimal, and aaa...a is the ASCII contents (data) of the buffer. CONTROL CO P1=$xxxx P2=$xxxx where xxxx are hex values for P1 and P2. DEVICE CONTROL DC P1=$xxxx P2=$xxxx FN=#ffff [BUF/#llll=hhhh] where xxxx are the hex values for P1 and P2, ffff is the decimal value of the FDEVICECONTROL function, llll is the buffer length in decimal, and hhh...h is the hex contents of the buffer. Suppose you are the creator of spool file O2.OUT.HPSPOOL. You want to display 77 characters per line and the first ten records. Enter: PRINTSPF "O2; END=10; WIDTH=77" The output appears in figure 6-1. ______________________________________________________________________________________ | | | | | PRINTSPF A.00.00 Copyright (C) Hewlett-Packard 1989 All rights reserved. | | OP P1=$0000 P2=$0000 | | WR P1=$0001 P2=$0000 CC=%000 BUF/# 21= :JOB MANAGER.SYS,PUB. | | WR P1=$0001 P2=$0000 CC=%000 BUF/# 51=PRIORITY = DS; INPRI = 8; TIME = UNLI | | WR P1=$0001 P2=$0000 CC=%000 BUF/# 17= JOB NUMBER = #J1. | | WR P1=$0001 P2=$0000 CC=%000 BUF/# 28= MON, NOV 22, 1989, 9:35 AM. | | WR P1=$0001 P2=$0000 CC=%000 BUF/# 25= HP3000 / MPE XL Z.34.45 | | WR P1=$0001 P2=$0000 CC=%000 BUF/# 75= MPE XL CI A.20.00 Copyright (C) Hewle | | WR P1=$0001 P2=$0000 CC=%000 BUF/# | | WR P1=$0001 P2=$0000 CC=%000 BUF/# 23= :setvar hpautocont true | | WR P1=$0001 P2=$0000 CC=%000 BUF/# 1= : | | | ______________________________________________________________________________________ Figure 6-1. PRINTSPF Sample Output To display the entire contents of spool file O2.OUT.HPSPOOL, enter: PRINTSPF O2
NOTE If file O2 exists in your logon group and account, PRINTSPF prints that file instead of O2.OUT.HPSPOOL.
Chapter 3 contains other examples for PRINTSPF. Error messages The following are error messages of PRINTSPF: * Command syntax error. * The file name is too long. * No file name was specified.


MPE/iX 5.0 Documentation