100% found this document useful (1 vote)
165 views25 pages

Handling Spooled Files and Printing Functions: Presented by

The document discusses printing functions on the AS/400 system including spooled files, output queues, printer writers, and common printing commands. Printed output is stored as spooled files in output queues before being sent to physical printers by printer writers. Commands like WRKOUTQ and DSPSPLF allow users to work with spooled files and output queues.

Uploaded by

sohel parvez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
165 views25 pages

Handling Spooled Files and Printing Functions: Presented by

The document discusses printing functions on the AS/400 system including spooled files, output queues, printer writers, and common printing commands. Printed output is stored as spooled files in output queues before being sent to physical printers by printer writers. Commands like WRKOUTQ and DSPSPLF allow users to work with spooled files and output queues.

Uploaded by

sohel parvez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Handling Spooled Files and

Printing Functions

Presented By

Mohammad Sohel Parvez


Senior Principal Officer
IT Division, Head Office
IFIC Bank Ltd.
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.
iSeries Printing Elements

■ Output Queue
An Output Queue is an object that contains printer output
waiting to be printed.

■ Spooled File
This printer output is also called a spooled file.

■ Printer Writer
The printer writer is a system program that sends spooled files
from an output queue to a physical printer. Normally, you have
an output queue for each printer on your system, and the
printer and output queue have the same name.
iSeries Printing Elements
iSeries Printing Load Balancing
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.
Two Separate Printing Functions

❶ Program-to-Queue.
❷ Queue-to-Printer.

Program ► Queue ► Printer


AS/400 Typical Output Queues

■ QPRINT
■ QSYSPRT
Spooled file subsystem

The spooled file subsystem, QSPL, is used for


processing the printer writer programs and must be
active when printer writer programs are active.
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.
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)
Printing Commands Examples

• WRKOUTQ *ALL
• WRKOUTQ QPRINT
All Output Queues
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
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
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
_ R1404DSP A97001080 RDY 8 1 *STD 5
_ R1505 A97001080 RDY 12 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
Display Spool File Command -DSPSPLF

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
Spool File Commands

Command Description
CHGSPLFA Change Spool File Attributes
CPYSPLF 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
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
Spool File Control Line Commands

Command 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.


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
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
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
_ R1404DSP A97001080 RDY 8 1 *STD 5
2 R1505 A97001080 RDY 12 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
Printer Writer Commands

■ Start Printer Writer (STRPRTWTR)


■ End Printer Writer (ENDPRTWTR)
■ Hold Printer Writer (HLDPRTWTR)
■ Release Printer Writer (RLSPRTWTR)
■ Work with Writers (WRKWTR)
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
Library . . . . . . . . . . . ______ Name, *LIBL, *CURLIB
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
Thank You

You might also like