The AS/400 and the printing process Chapter 5 The AS/400 and the printing process
4 Types of Files *file Each of these is an object with a TYPE of *FILE but is further described with an attribute. The attribute helps define how the object can be used. Physical Files (PF) Logical Files (LF) Printer Files (PRTF) Display Files (DSPF) W7L1ops400.ppt
4 Types of Files *file Opt Object Type Attribute Text CRTFILE *PGM CLP SAMPLE COMMAND CREATION TESTMENU *MSGF EVFEVENT *FILE PF-DTA MENUSRC *FILE PF-SRC menu designs QCMDSRC *FILE PF-SRC TESTDATA *FILE PF-DTA CREATING COMMAND TESTMENU *FILE DSPF SUM05 *CMD SUMMER 2005 TESTPRT *FILE PRTF W7L1ops400.ppt
GENERATING HARD COPY DATA Printer file The program User 2 User 1 The output queue / spool files PRT01 User 2 User 1 User 3 PRINTER WRITERS LASER1 PRT01 LPRT1
Requirements DATA a PROGRAM APPLICATION OR SYSTEM a PRINTER FILE ATTRIBUTES / TEMPLATE an OUTPUT QUEUE HOLDING BIN a PRINTER WRITER physical device assignment a PRINTER Laser, character, line, page PAPER e.g. standard 8-1/2 x 11, 11x15, custom forms
DATA Can come from anywhere disk, tape, screen, communications, internet, e-biz Is managed / created / manipulated by a program
the program Receives data by way of input Processes the data Generates output one form of which is reports merges the data with the print file and directs it to a output queue e.g QPRINT
the printer file Holds the report attributes / properties (can be looked on as a template) Lines per inch characters per inch Font form length in lines overflow line number Printer device type
The output queue Temporary storage Receives and directs the printer output to a printer writer or holds it until a printer writer is activated (varied on) Can retain the documents and be redirected to another output queue Is connected / associated with a printer writer.
The printer writer Is a device file *DEVD Contains all the attributes associated with the physical device connection port no, controller, address device type type and model number features (AFP capable) to be powered up at IPL (boot up) font used paper source (if applicable) The message queue used to communicate with the system etc. etc.
The printer Receives the DATA Has paper mounted or stored in the trays. Has inked ribbons / a full toner cartridge / ink cartridge Merges the INK, DATA and Paper and produces the “HARDCOPY” document
Application/System utility/Command data Application/System utility/Command Formatted report Printer File eg. QSYSPRINT, QPRINT Output Queue Printer Writer Physical printer Paper Report
OUTPUT QUEUES and SPOOL FILES PRINT FUNCTIONS OUTPUT QUEUES and SPOOL FILES
output queues v.s. spool files Output queues contain the printer output of ANY user directed to it and are directly associated (soft) with a printer device. (MANY user’s to ONE queue) Spool files contain the printer output from one specific user regardless of the queue it is directed to. (ONE user to MANY queues)
wrkoutq command Work with Output Queue Queue: PRT01 Library: QGPL Status: RLS/WTR 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 -- QPSUPRTF DA540A26 SAV 2 1 *STD 5 -- QPRINT SIMONLI PROG041B SAV 1 1 *STD 5 -- QSYSPRT CE500A09 test SAV 1 1 *STD 5 -- QPRINT DA344I06 AR100C HLD 2 1 *STD 5 -- QPUSRPRF DA400C07 SAV 2 1 *STD 5
Wrksplf USER(username) command Work with All Spooled Files 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 Device or Total Cur Opt File User Queue User Data Sts Pages Page ... -- QPEZBACK QSYSOPR QPRINT DSPBCKSTS RDY 2 1
Components of Printer Spooling Output queues - Spooled Files Printer files Printer Writers System spooler part of OS/400 that controls and manages printed output runs in subsystem QSPL W7L1ops400.ppt
Printer Files Objects on the AS/400 Object Type is *FILE Sub-Type (attribute) is PRTF Holds the Report Layout and print characteristics Commands: CRTPRTF, CHGPRTF W7L1ops400.ppt
Printer Files cont’d Defaults are QSYSPRT, QPRINT … CHGPRTF changes the attributes of a Printer Device File Some attributes you can change are: Page size: Length--lines per page . Width--positions per line Measurement method . . . Lines per inch . . . . . . Characters per inch . . . Overflow line number . . . Be careful when changing printer files as the change effects all programs that use the printer file. For example, there might be hundreds of programs using QPRINT. Also not all printers support all attributes I.e. If you make cpi to high, some older printers can not handle very small characters. W7L1ops400.ppt
Spooled Files They are - - AS/400 objects that contain data for printing - Stored in Output Queues And - To print a Spooled File, the file must be moved to an Output Queue attached to a printer. Spooled files can be reports or print screens. Most commands have the option of outputting to screen which is the default or outputting to printer which is *print on output parameter.
How Do Spooled Files get Created? JOB QINTER/QBATCH Output Queue Program/ Command Spooled File Data Report Layout *FILE PF *FILE PRTF W7L1ops400.ppt
What Components do you Need …to Print? Output Queue - Spooled File Printer Device Description (Printer Writer) *DEVD Printer Paper W7L1ops400.ppt
Spoolfile DA999X99 OUTPUT QUEUE PRT01 SPLF#1 SPLF#3 SPLF#2 SPLF#4 Change / Move the Spooled File to OutQ PRT01 SPLF#3 SPLF#2 SPLF#4
Spool Files Commands Change Spooled File Attributes (outq,copies,save) (2) CHGSPLFA Copy Spooled File to physical file (3) CPYSPLF Delete Spooled File from outq (4) DLTSPLF Display contends of Spooled File (5) DSPSPLF Hold Spooled File that is ready to print (6) HLDSPLF Release Spooled File that is held (7) RLSSPLF Send Network Spooled File to another AS/400 (1) SNDNETSPLF These commands require the parameters: Spooled file Job name User Number Spooled file number W7L1ops400.ppt
Changing Spool Files Use WRKOUTQ or WRKSPLF to display spool files To change a spool file put option 2 next to spool file entry on LIST or CHGSPLFA The following are some spool file attributes that can be changed: PRINTER Form type Copies Restart printing page Output Queue Start/End page to print W7L1ops400.ppt
Output Queue PRT01 Spooled Files Printer Writer PRT01 Paper Report Printed Characters
Printer Writer It is How the AS/400 sees a Printer It is an Object It has an Object Type of *DEVD The AS/400 creates an output queue with the same name as the printer when the Printer Device is created. For example printer PRT01 is a object with object type *DEVD
Printer Writer CONT’D 1 A utility used to move spooled files from the outq to the physical printer. When the Printer Device is created (CRTDEVPRT) the AS/400 creates a writer and an output queue with the same name as the printer. A writer is always associated with the printer it was created for W7L1ops400.ppt
Printer Writers cont’d Usually the Printer Writer is attached to the output queue with the same name. Command: CHGWTR To display the status of a printer, use the Work with Writer command, (WRKWTR) STRPRTWTR Use this command to start a printer and / or assign it to a different printer different output queue different message queue
Working with Printers STRPRTWTR - start a printer ENDWTR - end a printer CHGWTR - change writer ( such as outq) HLDWTR - put printer on hold (pause) RLSWTR - release printer that is on hold (can release at specified page) WRKCFGSTS - work configuration status to VARYON or VARYOFF most printer problems are either paper jam or no ink use WRKWTR then option 7 to display message if you suspect a printer problem
Work with All Writers Type options, press Enter Work with All Writers Type options, press Enter. 2=Change 3=Hold 4=End 5=Work with 6=Release 7=Display messages 8=Work with output queue Opt Writer Type Device Queue Library Status Form Type ODINQ RMT ODINQ QGPL STR *ALL PRTORIGIN RMT PRTORIGIN QGPL STR *ALL PRTTEST RMT PRTTEST QGPL STR *ALL PRT01 RMT PRT01 QGPL STR *ALL PRT02 RMT PRT02 QGPL STR *ALL PRT03 RMT PRT03 ADMIN STR *ALL RMTOUTQ RMT RMTOUTQ LYDIA_LI STR *ALL RMTW000001 RMT PRT03 QGPL STR *ALL WIN RMT WIN QGPL STR *ALL Bottom Parameters for options 2, 3, 4, 6 or command ===> F3=Exit F4=Prompt F12=Cancel F22=Start printer writer F24=More keys W7L1ops400.ppt
Trouble Shooting Printer Problems When there is a problem with printing, you need to check 2 things: the hardware: is it turned on, is the paper loaded, is there a jam, etc the software: is the writer started, is there a message waiting, is the outq held, if it is a remote printer are the communications ok? Commands: WRKWTR STRPRTWTR ENDWTR RLSOUTQ W7L1ops400.ppt
If ALL else fails You can always use GO ASSIST or GO SYSTEM to navigate your way to the output queue / spool files / devices work with printer output
The END GOOD LUCK WITH THE TEST AND IN THE REMAINDER OF THE SEMESTER