|
In this example, three record groups are printed. A user routine
is provided to manipulate output records before they are printed.
//PRINT JOB ...
//STEP1 EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD DSNAME=SEQDS,UNIT=disk,DISP=(OLD,KEEP),
// LABEL=(,SUL),VOLUME=SER=111112
//SYSUT2 DD SYSOUT=A
//SYSIN DD *
PRINT MAXFLDS=9,MAXGPS=9,MAXLITS=23,STOPAFT=32767
TITLE ITEM=('TIMECONV-DEPT D06'),
ITEM=('JAN10-17',80)
EXITS OUTREC=NEWTIME,INHDR=HDRS,INTLR=TLRS
RECORD IDENT=(6,'498414',1),
FIELD=(8,1,,10),FIELD=(30,9,XE,20)
RECORD IDENT=(2,'**',39),
FIELD=(8,1,,10),FIELD=(30,9,XE,20)
RECORD IDENT=(6,'498414',1),
FIELD=(8,1,,10),FIELD=(30,9,XE,20)
LABELS CONV=XE,DATA=ALL
/*
The control statements are as follows:
- SYSUT1 DD defines the input data set, called SEQDS. The data set
resides on a disk volume.
- SYSUT2 DD defines the output data set on the system output device
(printer assumed).
- SYSIN DD defines the control data set, which follows in the input
stream.
- The PRINT statement:
- Initializes the print operation.
- Indicates that not more than nine FIELD parameters are included
in subsequent RECORD statements (MAXFLDS=9).
- Indicates that not more than nine IDENT parameters are included
in subsequent RECORD statements (MAXGPS=9).
- Indicates that not more than 23 literal characters are included
in subsequent IDENT parameters (MAXLITS=23).
- Indicates that processing is ended after 32767 records are processed
or after the third record group is processed, whichever comes first.
Because MAXLINE is omitted, 60 lines are printed on each page.
- TITLE specifies two titles, to be printed on one line. The titles
are not converted to hexadecimal.
- EXITS specifies the name of a user routine (NEWTIME), which is
used to manipulate output records before they are printed.
- The first RECORD statement defines the first record group to be
processed and indicates where information from the input records is
placed in the output records. Positions 1 through 8 of the input records
appear in positions 10 through 17 of the printed output, and positions
9 through 38 are printed in hexadecimal representation and placed
in positions 20 through 79.
- The second RECORD statement defines the second group to be processed.
The parameter in the IDENT operand specifies that an input record
last record edited according to the FIELD operand in this RECORD statement.
The FIELD operand specifies that positions 1 through 8 of the input
records are placed in positions 10 through 17 of the printed output,
and positions 9 through 38 are printed in hexadecimal representation
and appear in positions 20 through 79.
- The third and last RECORD statement is equal to the first RECORD
statement. An input record that meets the parameter in the IDENT operand
ends processing, unless the STOPAFT parameter in the PRINT statement
has not already done so.
- LABELS specifies that all user header or trailer labels are to
be printed regardless of any return code, except 16, issued by the
user's exit routine. It also indicates that the labels are converted
from alphanumeric to hexadecimal representation (CONV=XE).
|