.CHAPTER Batch and Print Topics .hl 1 General The VAX has both batch and print queues. They are under the control of the queue manager, a system routine that is activated at boot time. Jobs are placed in queues and executed in accordance with specific guidelines. To get a list of all queues on the system, type in ^&SHOW_ QUEUE/ALL\&. To only get a list of jobs that are currently running, use the Q utility. .hl 1 Batch Queues There is currently only 1 batch queue for general use by the users. It is called SYS$BATCH, and is the default queue that a job goes to when using the SUBMIT command. .hl 2 Changing a Job's Priority If a job needs to have its priority raised, make sure Tech Services is aware of the request. Under no circumstances should a batch job run at higher priority than than the interactive users, which is currently level 4. .s Using the Q utility, find out the job's PID. Then give yourself the ALTPRI privilege and raise the IPL of the job. Finally, give up the ALTPRI privilege. .hl 3 Example .s .nf [RUCKER] $ ^&Q\& QUEUE STATUS ON 27-NOV-88 15:56:36 Q QUEUE SIZE BLKS T NAME JOB NAME USER ENTRY WHEN SUBMITTED BLKS PRTD STATUS - ----- -------- ------- ----- ------------------ ---- ---- --------- B SYS$B SLOWPOKE RUCKER 244 27-NOV-88 15:47:38 PID=00F33 Executing [RUCKER] $ ^&SET_ PROCESS/PRIV=ALTPRI\& [RUCKER] $ ^&SET_ PROCESS/PRIORITY=4/ID=F33\& [RUCKER] $ ^&SET_ PROCESS/PRIV=NOALTPRI\& .S .F .hl 2 Changing The Job Limit If a batch queue needs to have either fewer or more slots open, be sure to notify Tech Services. Find out the current limit and then modify it accordingly with the "SET QUEUE/JOB_LIMIT=" command. .hl 3 Example .s .nf [RUCKER] $ ^&SHOW_ QUEUE/FULL_ SYS$BATCH\& Batch queue SYS$BATCH .no flags accept /BASE_PRIORITY=3 /JOB_LIMIT=6 /OWNER=[SYSTEM] /PROTECTION=(S:E,O:D,G:R,W:W) .flags accept [RUCKER] $ ^&SET_ QUEUE/JOB=4_ SYS$BATCH\& [RUCKER] $ ^&SHOW_ QUEUE/FULL_ SYS$BATCH\& Batch queue SYS$BATCH .no flags accept /BASE_PRIORITY=3 /JOB_LIMIT=4 .flags accept /OWNER=[SYSTEM] /PROTECTION=(S:E,O:D,G:R,W:W) .F .hl 2 Killing a Batch Job that is currently executing First, type in "Q" to get the entry number and the queue. The status should be "Executing". Then type in "STOP/QUEUE/ENTRY= queue", where "" is the entry number. The queue name will usually be SYS$BATCH, which is truncated by the Q utility to "SYS$B". .hl 3 Example .s .nf [RUCKER] $ ^&Q\& QUEUE STATUS ON 27-NOV-88 15:56:36 Q QUEUE SIZE BLKS T NAME JOB NAME USER ENTRY WHEN SUBMITTED BLKS PRTD STATUS - ----- -------- ------- ----- ------------------ ---- ---- --------- B SYS$B SLOWPOKE RUCKER 244 27-NOV-88 15:47:38 PID=00F33 Executing [RUCKER] $ ^&STOP/QUEUE/ENTRY=244_ SYS$BATCH\& .F .hl 2 Killing a Batch Job that is queued for executing First, type in "Q" to get the entry number and the queue. The status should be "Pending". Then type in "DELETE/ENTRY= queue", where "" is the entry number. The queue name will usually be SYS$BATCH, which is truncated by the Q utility to "SYS$B". .hl 3 Example .s .nf [RUCKER] $ ^&Q\& QUEUE STATUS ON 27-NOV-88 15:56:36 Q QUEUE SIZE BLKS T NAME JOB NAME USER ENTRY WHEN SUBMITTED BLKS PRTD STATUS - ----- -------- ------- ----- ------------------ ---- ---- --------- B SYS$B SLOWPOKE RUCKER 244 27-NOV-88 15:47:38 PID=00000 Pending [RUCKER] $ ^&DELETE/QUEUE/ENTRY=244_ SYS$BATCH\& .F .hl 1 Print Queues .hl 2 Types of Queues There are 2 types of print queues on the VAX: .ls .le;Generic queues that users queue printouts to. Examples include PR7, MKT1, and PPR1. These queues are only holding queues. When jobs actually print, they are first requeued to execution queues and then print from there. .le;Execution queues, which are tied to a specific hardware port on the VAX, with the first 3 characters TXA. TXA0 is the system printer. Only Operations and Tech Services personnel have privilege to print to it. The other execution queue ports are each attached to NIU ports. There are currently 2 SPD execution queues, meaning that 2 shared printers may be active at the same time. .ELS .hl 2 Requeueing a Print Job .hl 3 The Job Is Still Pending If the print job is still pending, simply use the Q utility to find its entry number and requeue it. .hl 4 Example Assume that you want to requeue a job from PR7 to MKT1. .nf [RUCKER] $ ^&Q\& QUEUE STATUS ON 27-NOV-88 15:56:36 Q QUEUE SIZE BLKS T NAME JOB NAME USER ENTRY WHEN SUBMITTED BLKS PRTD STATUS - ----- -------- ------- ----- ------------------ ---- ---- --------- B PR7 REPORT.L RUCKER 244 27-NOV-88 15:47:38 27 0 Pending [RUCKER] $ ^&SET_ QUEUE/REQUEUE=MKT1/ENTRY=244_ PR7\& [RUCKER] $ ^&Q\& QUEUE STATUS ON 27-NOV-88 15:57:24 Q QUEUE SIZE BLKS T NAME JOB NAME USER ENTRY WHEN SUBMITTED BLKS PRTD STATUS - ----- -------- ------- ----- ------------------ ---- ---- --------- B MKT1 REPORT.L RUCKER 244 27-NOV-88 15:47:38 27 0 Pending .F .hl 3 The Job Has Already Begun Printing If a print job needs to be reprinted from the top (say, the printer jammed in the middle of a report), ask the user if the report exists and can be requeued manually. If so, abort the currently executing print job, stop and restart SPD, and have the user requeue the job. If this is not possible, the following procedure must be used. .hl 4 Stop SPD Refer to the SPD section for details on this. .hl 4 Move the file from TXA to Generic Queue Using the "Q" utility, find the physical TXA device that is connected to the printer. (In this example, it is TXA6.) Stop this queue, restart it from the top, and immediately restop it. Then requeue the job to the generic queue. .nf .s [RUCKER] $ ^&Q\& QUEUE STATUS ON 27-NOV-88 15:56:36 Q QUEUE SIZE BLKS T NAME JOB NAME USER ENTRY WHEN SUBMITTED BLKS PRTD STATUS - ----- -------- ------- ----- ------------------ ---- ---- --------- P*PR7 Q.LIS RUCKER 244 27-NOV-88 15:47:38 341 219 Executing *PR7 started printing TXA6 at 27-NOV-88 15:48:15 [RUCKER] $ ^&STOP/QUEUE/RESET_ TXA6\& [RUCKER] $ ^&START/QUEUE/TOP_ TXA6\& [RUCKER] $ ^&STOP/QUEUE/RESET_ TXA6\& [RUCKER] $ ^&SET_ QUEUE/REQUEUE=PR7/ENTRY=244_ TXA6\& [RUCKER] $ ^&Q\& QUEUE STATUS ON 27-NOV-88 16:01:04 Q QUEUE SIZE BLKS T NAME JOB NAME USER ENTRY WHEN SUBMITTED BLKS PRTD STATUS - ----- -------- ------- ----- ------------------ ---- ---- --------- P PR7 Q.LIS RUCKER 244 27-NOV-88 15:47:38 341 0 Pending .f .hl 4 Start SPD Refer to the SPD section for details on this. .hl 2 Killing a Print Job that is currently printing First, type in "Q" to get the entry number and the queue. (Note that the queue will always be the TXA device.) Then type in "STOP/QUEUE/ENTRY= queue", where "" is the entry number. .hl 3 Example .nf [RUCKER] $ ^&Q\& QUEUE STATUS ON 27-NOV-88 15:56:36 Q QUEUE SIZE BLKS T NAME JOB NAME USER ENTRY WHEN SUBMITTED BLKS PRTD STATUS - ----- -------- ------- ----- ------------------ ---- ---- --------- P*PR7 Q.LIS RUCKER 244 27-NOV-88 15:47:38 341 219 Executing *PR7 started printing TXA6 at 27-NOV-88 15:48:15 [RUCKER] $ ^&STOP/QUEUE/ENTRY=244_ TXA6\& .f .hl 2 Killing a Print Job that is queued for printing First, type in "Q" to get the entry number and the queue. Then type in "DELETE/ENTRY= queue", where "" is the entry number. .hl 3 Example .s .nf [RUCKER] $ ^&Q\& QUEUE STATUS ON 27-NOV-88 15:56:36 Q QUEUE SIZE BLKS T NAME JOB NAME USER ENTRY WHEN SUBMITTED BLKS PRTD STATUS - ----- -------- ------- ----- ------------------ ---- ---- --------- P PR7 Q.LIS RUCKER 244 27-NOV-88 15:47:38 341 0 Pending [RUCKER] $ ^&DELETE/QUEUE/ENTRY=244_ PR7\& .F .hl 1 SPD System The VAX uses a Shared Printer Driver (SPD) software system that prints output reports on printers that are shared among different computer systems. They are currently the VAX, Sperry, and Prime. This allows for printers to be located closer to the users. It also means that fewer printers are needed, as they are shared by different machines. .s The printers are directly attached to the Local Area Network. The way that output is printed is by creating a virtual circuit, through the network, and then printing as if the printer were locally attached. .hl 2 SPD Components The SPD system include the following components: .ls .le;^&Generic_ queues\& are ones that users queue printouts to; examples include PR7, MKT1, and PPR1. These queues are only holding queues. When jobs actually print, they are first requeued to execution queues and then print from there. .le;^&Execution_ queues\& are tied to a specific hardware port on the VAX, with the first 3 characters TXA. Each port is then attached to an NIU port. There are currently 2 SPD execution queues, meaning that 2 shared printers may be active at the same time. .le;^&The_ SPD_ program\& coordinates the creating and breaking of NIU circuits, requeueing, and logging. .le;^&The_ Q_ utility\&, though not only associated with the SPD system, hides most of the SPD configuration from the user while providing enough information for support personnel to use it in troubleshooting. .le;^&The_ Q_ audit_ utility\& searches the audit file for specified information. .els Here is the full scenario of how these different components interface with each other. The SPD program periodically checks to see if there is any output in a generic queue. If not, it goes to sleep for a specified time interval. If so, it checks to see if an execution queue is available. If not, it goes to sleep for a specified time interval. If an execution queue is available, it tries to establish a virtual link with the specified printer via the printer's NIU address. If this link cannot be established, the program goes to sleep. If a circuit is established, the files are then requeued from the generic queue to the execution queue. For each file printed, a log entry is made in the audit file. Requeueing of files continues until (1) the number of jobs requeued exceeds the queue's limit as set in the SPD program; (2) the number of blocks requeued exceeds the queue's limit as set in the SPD program; or (3) there are no more jobs to be requeued. At this point, the SPD program hangs up the virtual circuit and pauses for 3 minutes to allow other SPD systems on the Sperry and Prime to contend for the printer. Then the cycle starts all over again. .hl 2 SPD Commands .hl 3 Starting SPD .no flags accept Enter the command ^&@MED$SHAREQ:SPD-START\& .flags accept .hl 3 Stopping SPD Locate the job with the job name "SPD" and stop it. .nf .s [RUCKER] $ ^&SHOW_ SYSTEM\& .no flags accept VAX/VMS V5.0-2 on node MSPV1 27-NOV-1988 15:59:04.96 Pid Process Name State Pri I/O CPU 00000101 SWAPPER HIB 16 0 0 00:00:03.64 00000104 ERRFMT HIB 8 206 0 00:00:00.42 . . 00000132 SPD HIB 4 76 0 00:00:01.57 00000137 sir/master_137 LEF 6 689 0 00:00:05.55 00000138 JONESM_1 HIB 6 311 0 00:00:00.55 0000015D RUCKER HIB 8 1160 0 00:00:22.08 0000015E RUCKER_RTA1: CUR 5 567 0 00:00:05.40 .flags accept [RUCKER] $ ^&SET_ PROC/PRIV=WORLD\& [RUCKER] $ ^&STOP/ID=132\& [RUCKER] $ ^&SET_ PROC/PRIV=NOWORLD\& .f .hl 3 Seeing if SPD is Running Locate the job with the job name "SPD". If it cannot be located, it is not running. .nf .s [RUCKER] $ ^&SHOW_ SYSTEM\& .no flags accept VAX/VMS V5.0-2 on node MSPV1 27-NOV-1988 15:59:04.96 Pid Process Name State Pri I/O CPU 00000101 SWAPPER HIB 16 0 0 00:00:03.64 00000104 ERRFMT HIB 8 206 0 00:00:00.42 . . 00000132 SPD HIB 4 76 0 00:00:01.57 00000137 sir/master_137 LEF 6 689 0 00:00:05.55 00000138 JONESM_1 HIB 6 311 0 00:00:00.55 0000015D RUCKER HIB 8 1160 0 00:00:22.08 0000015E RUCKER_RTA1: CUR 5 567 0 00:00:05.40 .flags accept .f .s In this example, it is running as PID 132. .hl 2 Queue Audit To verify that a given job has printed, a certain printer is active for the day, etc., use this utility. Enter ^&QA\& and then some meaningful string to search for. (The string may not contain embedded blanks in it.) For example, to see if there were any printer activity on December 25th, you would enter the following: .S .NF [RUCKER] $ ^&QA_ 25-DEC\& .no flags accept GENC EXCN ENTRY QUE QUE USERID NO. JOB NAME WHEN QUEUED WHEN PRINTED ---- ---- ------ ---- --------- ------------------ ------------------ PR7 TXA6 SYSTEM 921 OPLOG_RUC 25-DEC-88 03:53:12 25-DEC-88 03:53:58 PR7 TXA6 SYSTEM 923 OPLOG_MON 25-DEC-88 03:53:14 25-DEC-88 03:54:59 .flags accept .S .F The audit file is cycled each month as part of the month-end processing, so previous months' data are not readily accessable. Contact Tech Services if you need access to these data. .HL 2 SPD Troubleshooting If the SPD system appears to be working abnormally, use the following procedure as a guide to fixing it. Suspicious behavior may include short jobs that have started printing a long time ago (this may indicate a paper jam); jobs that have never been printed although they have been queued a long time ago (another SPD system like the Prime's or Sperry's may have control of that printer's line and be hung); and multiple jobs listed for the same TXA device (usually an NIU hardware fault). The "Q" utility is the most useful one for pointing you in the right direction. .hl 3 Procedure .ls .le;Stop the SPD job. .le;Stop the offending execution queues, if necessary, with a ^&STOP/QUEUE/RESET\&. .le;Requeue any print jobs from the execution queue to the appropriate generic queues. .le;Make sure the hardware is all in working order. This includes checking the printer as well as the NIUs at the printer end and the host end. .le;From a network terminal, wake up the offending VAX NIU port by calling it. Call Operations to get the circuit number associated with the TXA device. .le;If one execution queue is correctly executing while another one is hung, do not restart the SPD job until the one that is executing correctly has completed printing. Otherwise, its output will be lost. .le;Start the SPD job. .ELS .s .hl 3 Example .s .NF [RUCKER] $ ^&Q\& QUEUE STATUS ON 27-NOV-88 15:56:36 Q QUEUE SIZE BLKS T NAME JOB NAME USER ENTRY WHEN SUBMITTED BLKS PRTD STATUS - ----- -------- ------- ----- ------------------ ---- ---- --------- P*PR7 Q.LIS RUCKER 244 27-NOV-88 15:47:38 341 219 Executing *PR7 started printing TXA6 at 27-NOV-88 15:48:15 .s [RUCKER] $ ^&SHOW_ SYSTEM\& .no flags accept VAX/VMS V5.0-2 on node MSPV1 27-NOV-1988 15:59:04.96 Pid Process Name State Pri I/O CPU 00000101 SWAPPER HIB 16 0 0 00:00:03.64 00000104 ERRFMT HIB 8 206 0 00:00:00.42 . . 00000132 SPD HIB 4 76 0 00:00:01.57 00000137 sir/master_137 LEF 6 689 0 00:00:05.55 00000138 JONESM_1 HIB 6 311 0 00:00:00.55 0000015D RUCKER HIB 8 1160 0 00:00:22.08 0000015E RUCKER_RTA1: CUR 5 567 0 00:00:05.40 .flags accept [RUCKER] $ ^&SET_ PROC/PRIV=WORLD\& [RUCKER] $ ^&STOP/ID=132\& [RUCKER] $ ^&SET_ PROC/PRIV=NOWORLD\& [RUCKER] $ ^&STOP/QUEUE/RESET_ TXA6\& [RUCKER] $ ^&START/QUEUE/TOP_ TXA6\& [RUCKER] $ ^&STOP/QUEUE/RESET_ TXA6\& [RUCKER] $ ^&SET_ QUEUE/REQUEUE=PR7/ENTRY=244_ TXA6\& [RUCKER] $ ^&Q\& QUEUE STATUS ON 27-NOV-88 15:58:20 Q QUEUE SIZE BLKS T NAME JOB NAME USER ENTRY WHEN SUBMITTED BLKS PRTD STATUS - ----- -------- ------- ----- ------------------ ---- ---- --------- P PR7 Q.LIS RUCKER 244 27-NOV-88 15:47:38 341 0 Pending <<< here the hardware would be physically inspected <<< From a network terminal, you would enter the following: <<< Enter Selection: ^&c43,8\& (this corresponds to TXA7) <<< Disconnected by remote (this is the correct reply) [RUCKER] $ ^&@MED$SHAREQ:SPD-START\& %S, identification of created process is 00000164 .f