Handling Spooled Files and Printing Functions Chapter 6 Handling Spooled Files and Printing Functions
Understanding AS/400 System Operations AS/400 Printing Overview No program ever sends output directly to printer. Printed output always goes to hard disk storage. Printed output goes to output queue. System program, printer intercept program, delivers content to a printer. This type of printing called spooling. Output waiting to be directed to a printer is known as spooled files. Understanding AS/400 System Operations
Understanding AS/400 System Operations The Printing Process Job produces a report. Printed output (report) goes to output queue. A program later sends the queued report to a printer for printing. Understanding AS/400 System Operations
Two Separate Functions Program-to-Queue. Queue-to-Printer. Understanding AS/400 System Operations
AS/400 Typical Output Queues QPRINT QSYSPRT Understanding AS/400 System Operations
Understanding AS/400 System Operations Printer Writer The printer that prints, is a physical printer. AS/400 sees the logical device, that is the printer writer. Printer writers must be attached to an output queue to print anything. Understanding AS/400 System Operations
Jobs, Queues, and Printer Writers Figure 6-1: Jobs, queues, and printer writers. Understanding AS/400 System Operations
Understanding AS/400 System Operations Printing Commands Output queue commands: Create Output Queue (CRTOUTQ) Delete Output Queue (DLTOUTQ) Change Output Queue (CHGOUTQ) Display Output Queue (DSPOUTQ) Work with Output Queue (WRKOUTQ) Understanding AS/400 System Operations
Understanding AS/400 System Operations Examples WRKOUTQ *ALL WRKOUTQ QPRINT Understanding AS/400 System Operations
All Output Queues Understanding AS/400 System Operations Work with All Output Queues Type options, press Enter. 2=Change 3=Hold 4=Delete 5=Work with 6=Release 8=Description 9=Work with Writers 14=Clear Opt Queue Library Files Writer Status _ QDMT QDMT 0 RLS _ COBOLOUTQ QGPL 0 PRT01 RLS _ CPAOUTQ QGPL 741 RLS _ FACOUTQ QGPL 61 RLS _ OPROUTQ QGPL 0 RLS _ QDKT QGPL 0 RLS _ QPFROUTQ QGPL 0 RLS 2 QPRINT QGPL 62 RLS _ QPRINTS QGPL 0 RLS _ QPRINT2 QGPL 0 RLS _ CPAOUTQ QUSRSYS 0 RLS _ CPQOUTQ QUSRSYS 0 RLS More … Command ===> __________________________________________________________________ F3=Exit F4=Prompt F5=Refresh F12=Cancel F24=More keys Figure 6-2: Samples of the WRKQUTQ *ALL command. This shows all output queues on an AS/400. Understanding AS/400 System Operations
Understanding AS/400 System Operations Change Output Queue Change Output Queue (CHGOUTQ) Type choices, press Enter. Output queue . . . . . . . . . . > QPRINT Name Library . . . . . . . . . . . > QGPL Name, *LIBL, *CURLIB Maximum spooled file size: Number of pages . . . . . . . *SAME Number, *SAME, *NONE Starting time . . . . . . . . ______ Time Ending time . . . . . . . . . ______ Time + for more values _ Order of files on queue . . . . *SAME *SAME, *JOBNBR, *FIFO Remote system . . . . . . . . . *SAME Bottom F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F13=How to use this display F24=More keys Figure 6-3: Change screen for QPRINT queue. Understanding AS/400 System Operations
Understanding AS/400 System Operations Option5- Work With Work with Output Queue Queue: QPRINT Library: QGPL Status: RLS Type options, press Enter. 1=Send 2=Change 3=Hold 4=Delete 5=Display 6=Release 7=Messages 8=Attributes 9=Work with printing status Opt File User User Data Sts Pages Copies Form Type Pty 5 QPDZDTALOG A97001080 RDY 1 1 *STD 5 _ R1404DSP A97001080 RDY 8 1 *STD 5 _ R1505 A97001080 RDY 12 1 *STD 5 _ R1404PF A82322260 RDY 3 1 *STD 5 _ R1505DIS A82322260 RDY 6 1 *STD 5 _ R1505 A82322260 RDY 9 1 *STD 5 More . . . Parameters for options 1, 2, 3 or command ===> __________________________________________________________________ F3=Exit F11=View 2 F12=Cancel F20=Writers F22=Printers F24=More keys Figure 6-4: Option 5 (Work with) shows the contents of an output queue. Understanding AS/400 System Operations
Second View of Queue QPRINT Work with Output Queue Queue: QPRINT Library: QGPL Status: RLS Type options, press Enter. 1=Send 2=Change 3=Hold 4=Delete 5=Display 6=Release 7=Messages 8=Attributes 9=Work with printing status Opt File File Nbr Job User Number Date Time 5 QPDZDTALOG 5 QPADEV001J A97001080 150998 03/30/99 19:06:14 _ R1404DSP 1 R1404DSP A97001080 151164 03/30/99 19:09:17 _ R1505 1 R1505 A97001080 151204 03/30/99 19:16:01 _ R1404DSP 1 R1404DSP A97001080 151243 03/30/99 19:22:52 _ R1505 1 R1505 A97001080 151251 03/30/99 19:24:50 _ R1505 1 R1505 A97001080 151260 03/30/99 19:26:21 _ R1404PF 1 R1404PF A82322260 151266 03/30/99 19:26:53 _ R1505DIS 1 R1505DIS A82322260 151270 03/30/99 19:28:39 _ R1505 1 R1505 A82322260 151272 03/30/99 19:28:47 More. . . Parameters for options 1, 2, 3 or command ===> ___________________________________________________________________ F3=Exit F11=View 1 F12=Cancel F20=Writers F22=Printers F24=More keys Figure 6-5: Second view of spooled files in queue QPRINT Understanding AS/400 System Operations
Display Spool File Command Display Spooled File (DSPSPLF) Type choices, press Enter. Spooled file . . . . . . . . . . ___________ Name Job name . . . . . . . . . . . . * Name, * User . . . . . . . . . . . . . _________ Name Number . . . . . . . . . . . . _________ 000000-999999 Spooled file number . . . . . . *ONLY 1-9999, *ONLY, *LAST Bottom F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F13=How to use this display F24=More keys Figure 6-6: Five fields had to be used to qualify this command. Understanding AS/400 System Operations
DSPSPLF Vs. WRKOUTQ Commands Parameters Column Heading DSPSPLF command Matching Parameters in WRKOUTQ command view 2 File Spooled file Job name Job User Number File number Spooled file number Figure 6-7: Work with Output Queue column names match to parameter names. Understanding AS/400 System Operations
Understanding AS/400 System Operations Spool File Commands Command Description CHGSPLFA Change Spool File Attributes CRYSPLF Copy Spool File DLTSPLF Delete Spool File DSPSPLF Display Spool File HLDSPLF Hold Spool File RLSSPLF Release Spool File SNDNETSPLF Send Network Spool File SNDTCPSPLF Send TCP Spool File WRKPRTSTS Work with Printer Status Figure 6-6: Commands that, if not used through the Work with command, require a lot of detail to identify spool files. Understanding AS/400 System Operations
Understanding AS/400 System Operations Printed Spool File Display Spooled File File . . . . . : QPDZDTALOG Page/Line 1/1 Control . . . . . ____________________________ Columns 1 - 78 Find . . . . . . __________________________________________________ *...+....1....+....2....+....3....+....4....+....5....+....6....+....7.... 5769SS1 V4R2M0 980228 AUDIT LOG Library/File . . . . . WAT1080LIB/R1404PF Member . . . . . . . . R1404PF Job Title . . . . . . WORK WITH DATA IN A FILE SSNO COURSE NUMBER TERM DATE COURSE NAME IN Changed ******** 101 52297 COMPUTER SCIENCE I CSC101 Changed ******** 110 121597 MICROCOMPUTERS I DPS110 Changed ******** 310 121597 ADVANCED C CSC310 Changed ******** 210 52297 INTRO TO C CSC210 Changed ******** 201 52297 CALCULUS I MTH201 Changed ******** 202 121597 COMPUTER SCIENCE II More. . . F3=Exit F12=Cancel F19=Left F20=Right F24=More keys Figure 6-9: Contents of spooled file. Understanding AS/400 System Operations
Spool File Control Line Commands Action T Takes you to the top of the report (first page). B Takes you to the bottom of the report (last page). xx Puts line xx at the top of the screen. +xx Advances xx lines from the current line. -xx Goes back xx lines from the current line. Pxx Goes to the xx page of the report. P+xx Advances xx pages from the current page. P-xx Goes back xx pages from the current page. Wxx Puts the xx column on the left side of the screen. W+xx Shifts the report to the right xx characters. W-xx Shifts the report to the left xx characters. Figure 6-10: Commands for spool files. Understanding AS/400 System Operations
Change Spooled File Attributes Change Spooled File Attributes (CHGSPLFA) Type choices, press Enter. Spooled file . . . . . . . . . . > QPDZDTALOG Name, *SELECT Job name . . . . . . . . . . . . > QPADEV0004 Name, * User . . . . . . . . . . . . . > A91001170 Name Number . . . . . . . . . . . . > 150687 000000-999999 Spooled file number . . . . . . > 1 1-9999, *ONLY, *LAST Printer . . . . . . . . . . . . *OUTQ Name, *SAME, *OUTQ Print sequence . . . . . . . . . *SAME *SAME, *NEXT Form type . . . . . . . . . . . *STD Form type, *SAME, *STD Copies . . . . . . . . . . . . . 1 1-255, *SAME Restart printing . . . . . . . . *STRPAGE Number,*SAME,*STRPAGE... Additional Parameters Output queue . . . . . . . . . . QPRINT Name, *SAME, *DEV Library . . . . . . . . . . . QGPL Name, *LIBL, *CURLIB File separators . . . . . . . . 0 0-9, *SAME More. . . F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys Figure 6-11: Change Spooled File Attributes command – screen 1 Understanding AS/400 System Operations
Change Spooled File Attributes Change Spooled File Attributes (CHGSPLFA) Type choices, press Enter. Page range to print: Starting page . . . . . . . . 1 Number, *SAME, *ENDPAGE Ending page . . . . . . . . . *END Number, *SAME, *END File becomes available . . . . . *FILEEND *SAME, *JOBEND, *FILEEND... Save file . . . . . . . . . . . *NO *SAME, *NO, *YES Output priority . . . . . . . . 5 1-9, *SAME, *JOB User data . . . . . . . . . . . ' 'User data, *SAME Align page . . . . . . . . . . . *NO *SAME, *NO, *YES Print quality . . . . . . . . . *STD *SAME,*STD,*DEVD,*DRAFT... Form feed . . . . . . . . . . . *DEVD *SAME,*DEVD,*CONT,*CUT... Source drawer . . . . . . . . . 1 1-255, *SAME, *E1, *FORMDF Print fidelity . . . . . . . . . *CONTENT *SAME, *ABSOLUTE, *CONTENT Print on both sides . . . . . . *NO *SAME,*NO,*YES,*TUMBLE... Pages per side . . . . . . . . . 1 1-4, *SAME Form definition . . . . . . . . *NONE Name,*SAME,*NONE,*DEVD... Library . . . . . . . . . . . ____ Name, *LIBL, *CURLIB More. . . F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys Figure 6-12: Change Spooled File Attributes command – screen 2. Understanding AS/400 System Operations
Change Spooled File Attributes Change Spooled File Attributes (CHGSPLFA) Type choices, press Enter. Front side overlay: Overlay . . . . . . . . . . . *NONE Name, *NONE, *SAME Library . . . . . . . . . . ______ Name, *LIBL, *CURLIB Offset down . . . . . . . . . _________ 0.00-57.79, *SAME Offset across . . . . . . . . _________ 0.00-57.79, *SAME Back side overlay: Overlay . . . . . . . . . . . *FRONTOVL Name,*FRONTOVL,*NONE,*SAME User defined option . . . . . . *NONE Option, *SAME, *NONE + for more values _ User defined object: Object . . . . . . . . . . . . *NONE Name, *NONE, *SAME Library . . . . . . . . . . ________ Name, *LIBL, *CURLIB Object type . . . . . . . . . __________ *DTAARA, *DTAQ, *FILE... Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys Figure 6-12: Change Spooled File Attributes command – screen 3. Understanding AS/400 System Operations
Multiple Command Changes Work with Output Queue Queue: QPRINT Library: QGPL Status: RLS Type options, press Enter. 1=Send 2=Change 3=Hold 4=Delete 5=Display 6=Release 7=Messages 8=Attributes 9=Work with printing status Opt File User User Data Sts Pages Copies Form Type Pty 2 QPDZDTALOG A97001080 RDY 1 1 *STD 5 _ R1404DSP A97001080 RDY 8 1 *STD 5 2 R1505 A97001080 RDY 12 1 *STD 5 _ R1404PF A82322260 RDY 3 1 *STD 5 2 R1505DIS A82322260 RDY 6 1 *STD 5 _ R1505 A82322260 RDY 9 1 *STD 5 More . . . Parameters for options 1, 2, 3 or command ===> OUTQ(SYSPRT)______________________________________________________ F3=Exit F11=View 2 F12=Cancel F20=Writers F22=Printers F24=More keys Figure 6-14: Multiple changes in one operation from a Work with … menu. Understanding AS/400 System Operations
Printer Writer Commands Create Device Print (CRTDEVPRT) Automatic configuration System Value QAUTOCFG Display System Value (DSPSYSVAL) Change System Value (CHGSYSVAL) Work with Writers (WRKWTR) Start Printer Writer (STRPRTWTR) End Printer Writer (ENDPRTWTR) Hold Printer Writer (HLDPRTWTR) Release Printer Writer (RLSPRTWTR) Understanding AS/400 System Operations
Start Printer Writer Command Start Printer Writer (STRPRTWTR) Type choices, press Enter. Printer . . . . . . . . . . . . PRT01 Name, *ALL, *SYSVAL Output queue . . . . . . . . . . QPRINT Name, *DEV Library . . . . . . . . . . . ______ Name, *LIBL, *CURLIB Queue for writer messages . . . *DEVD Name, *DEVD, *REQUESTER Form type options: Form type . . . . . . . . . . *ALL Form type, *ALL, *STD, *FORMS Message option . . . . . . . . *INQMSG *INQMSG, *MSG, *NOMSG... File separators . . . . . . . . *FILE 0-9, *FILE Drawer for separators . . . . . *DEVD 1-255, *DEVD, *FILE Bottom F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F13=How to use this display F24=More keys Figure 6-15: Prompted version of the Start Printer Writer command. Understanding AS/400 System Operations
Selective Page Printing Change Spooled File Attributes (CHGSPLFA) Type choices, press Enter. Spooled file . . . . . . . . . . > STDCRSPF Name, *SELECT Job name . . . . . . . . . . . . > STDCRSPF Name, * User . . . . . . . . . . . . . > A91001170 Name Number . . . . . . . . . . . . > 149683 000000-999999 Spooled file number . . . . . . > 1 1-9999, *ONLY, *LAST Printer . . . . . . . . . . . . *OUTQ Name, *SAME, *OUTQ Print sequence . . . . . . . . . *SAME *SAME, *NEXT Form type . . . . . . . . . . . *STD Form type, *SAME, *STD Copies . . . . . . . . . . . . . 1 1-255, *SAME Restart printing . . . . . . . . 501 Number, *SAME, *STRPAGE... Additional Parameters Output queue . . . . . . . . . . QPRINT Name, *SAME, *DEV Library . . . . . . . . . . . QGPL Name, *LIBL, *CURLIB Bottom F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F13=How to use this display F24=More keys Figure 6-16: Example to change a spool file to cause it to start printing on Page 501. Understanding AS/400 System Operations