IBM AS/400 Frozen Dessert Maker User Manual


 
SRTSEQ/ALTSEQ
Output Spooling
Output spooling is valid for batch or interactive jobs. The description of the file that
is specified in the RPG program by the file name contains the specification for
spooling as shown in the following diagram:
RPG program
Spooled
File
QPRINT
Spooling
Queue
QPRINT
Execution Time
Start
Printer
writer
Start Printer
writer Time
Device
File name = QPRINT
Device = PRINTER
SPOOL (*YES)
QUEUE (QPRINT)
Figure 138. Output Spooling Example
File override commands can be used at run time to override the spooling options
specified in the file description, such as the number of copies to be printed. In addi-
tion, AS/400 spooling support allows you to redirect a file after the program has
run. You can direct the same printed output to a different device such as a diskette.
SRTSEQ/ALTSEQ in an RPG Program versus a DDS File
When a keyed file is created using SRTSEQ and LANGID, the SRTSEQ specified
is used when comparing character keys in the file during CHAIN, SETLL, SETGT,
READE and READPE operations. You do not have to specify the same, or any,
SRTSEQ value when creating the RPG program or module.
When a value for SRTSEQ is specified on CRTBNDRPG or CRTRPGMOD, then all
character comparison operations in the program will use this SRTSEQ. This value
affects the comparison of
all
fields, including key fields, fields from other files and
fields declared in the program.
You should decide whether to use SRTSEQ for your RPG program based on how
you want operations such as IFxx, COMP, and SORTA, to work on your character
data, not on what was specified when creating your files.
Chapter 15. General File Considerations 279