6.0

Detailed Directions
83
2. Create a permanent file (one file per document, each with a unique name). This name must be
WATCHWORK in the OBJLUNE library. WATCHWORK is hard coded in the CL program included in this
guide.
CRTPF FILE(OBJLUNE/WATCHWORK) RCDLEN(132)
3. Create a file to contain the string you entered in the Document dialog box (%%EODOCUMENT in our
example), and the appropriate trigger:
CRTPF FILE(&TRIGGERLIB/&TRIGGERFN) RCDLEN(300)
Replace &TRIGGERLIB and &TRIGGERFN with the appropriate names for your system.
4. In this file, enter the following. You can use the STRDFU command to do this.
%%EODOCUMENT
%!PS-Adobe
(INVOICE) run INVOICE
5. Create a printer file. You use this file to create the final spool file:
CRTPRTF FILE(&WATCHPRTFL/&WATCHPRTFN) DEVTYPE(*SCS)
Replace &WATCHPRTFL and &WATCHPRTFN with the appropriate names for your system. Note that this
printer file is standard: 66 lines/page, 6 lines/inch, and 132 characters/line. If a printer file is not
standard, you must create it according to your requirements.
6. Copy the CL WATCH program on your AS/400 system (see “CL Program for AS/400 Systems” on page
101).
7. Compile the program. This makes it possible to use it as a PGM WATCH object in the OBJLUNE library.
8. Program the work using a specialized software (i.e., Robot) or automatic scheduler provided with the
AS/400 system. The CALL format of the WATCH program must be done as follows:
CALL PGM(OBJLUNE/WATCH) PARM('&watchprtfn &watchprfl &outputqs &outputqslb &outputqd
&outputqdlb &triggerfn &triggerlib')
Where:
*** &watchprtfn: Printer file used to create the final spool file.
*** &watchprtfl: Library of the printer file used to create the final spool file.
*** &outputqs: Print queue (source).