|
- When INREC is specified, DFSORT reformats the input records after
user exit E15 or INCLUDE/OMIT statement processing is finished. Thus,
references to fields by your E15 user exit and INCLUDE/OMIT statements
are not affected, whereas your SORT, OUTREC, and SUM statements must
refer to fields in the reformatted input records. Your E35 user exit
must refer to fields in the reformatted output record.
- In general, OUTREC should be used rather than INREC so your SORT
and SUM statements can refer to fields in the original input records.
- If you use locale processing for SORT, MERGE, INCLUDE, or OMIT
fields, you must not use INREC. Use the OUTREC statement or the OUTFIL
statement instead of INREC.
- When you specify INREC, you must be aware of the change in record
size and layout of the resulting reformatted input records.
- Performance can be improved if you can significantly reduce the
length of your records with INREC. INREC and OUTREC should not be
used unless they are actually needed to reformat your records.
- For variable-length records, the first entry in the FIELDS, BUILD,
or IFTHEN BUILD parameter must specify or include the unedited 4-byte
record descriptor word (RDW), that is, the first field must be 1,4
or 1,m with m greater than 4. DFSORT sets the length of the reformatted
record in the RDW.
If the first field in the data portion of the
input record is to appear unedited in the reformatted record immediately
following the RDW, the entry in the FIELDS, BUILD, or IFTHEN BUILD
parameter can specify both RDW and data field in one (1,m,...). Otherwise,
the RDW must be specifically included in the reformatted record (for
example, 1,4,1,4,HEX).
- For variable-length records, OVERLAY, IFTHEN OVERLAY
or IFTHEN PUSH items must not overlay the RDW in bytes 1-4. You must
ensure that 1:, 2:, 3: or 4: is not specified or defaulted for any
OVERLAY or PUSH item. Note that the default for the first OVERLAY
or PUSH item is 1:, so you must override it.
- If the SORTOUT LRECL is specified or available, DFSORT will use
it even if it does not match the reformatted INREC record length;
this can cause padding or truncation of the reformatted INREC records,
or termination. If the SORTOUT LRECL is not specified or available,
DFSORT can automatically use the reformatted INREC record length as
the SORTOUT LRECL, when appropriate. See the discussion of the SOLRF
and NOSOLRF options in OPTION control statement.
For VSAM data sets,
the maximum record size defined in the cluster is equivalent to the
LRECL when processing fixed-length records, and is four bytes less
than the LRECL when processing variable-length records. See VSAM considerations for more information.
- With FIELDS, BUILD, or IFTHEN BUILD, the variable part of the
input record (that part beyond the minimum record length) can be included
in the reformatted record, and if included, must be the last part.
In this case, a value must be specified for pn that
is less than or equal to the minimum record length (see L4 of the
RECORD control statement) plus 1 byte; mn and
an must be omitted. For example:
INREC FIELDS=(1,8,20C'*',9)
With
OVERLAY, the variable part of the input record must not be included
in the reformatted record.
- If INREC with FIELDS or BUILD and OUTREC with FIELDS and BUILD
are specified, either both must specify position-only for the last
part, or neither must specify position-only for the last part. For
example:
INREC BUILD=(1,8,20C'*',9)
OUTREC BUILD=(1,4,3Z,5)
or: INREC FIELDS=(1,40,45,5)
OUTREC FIELDS=(1,45,C'****')
OVERLAY or IFTHEN, and FIELDS
or BUILD, can differ with respect to position-only. For example: INREC BUILD=(1,24,32:25)
OUTREC IFTHEN=(WHEN=(8,1,ZD,GT,+5),
BUILD=(1,24,25:C'Yes',28,10)),
IFTHEN=(WHEN=NONE,
BUILD=(1,24,25:C'No ',28,10))
or: INREC FIELDS=(1,18,8C'*',23)
OUTREC OVERLAY=(24:C'A')
- If the reformatted record includes only the RDW and the variable
part of the input record, "null" records containing only an RDW
could result.
- The input records are reformatted before processing, as specified
by INREC. The output records are in the format specified by INREC,
unless OUTREC is also specified.
- Fields referenced in INREC statements can overlap each other and
control fields or both.
- If input is variable records, the output is also variable. This
means that each record is given the correct RDW by DFSORT before output.
- If overflow might occur during summation, INREC can be used to
create a larger SUM field in the reformatted input record (perhaps
resulting in a larger record for sorting or merging) so that overflow
does not occur. Example 5 illustrates this technique.
- DFSORT issues a message and terminates if an INREC statement is
specified for a tape work data set sort or conventional merge application.
- If SZERO is in effect, -0 is treated as negative and +0
is treated as positive for edited or converted input fields, decimal
constants, and the results of arithmetic expressions. If NOSZERO is
in effect, -0 and +0 are treated as positive for edited or converted
input fields, decimal constants, and the results of arithmetic expressions.
- If SZERO is in effect, -0 compares as less than +0 when numeric
fields and constants are used. If NOSZERO is in effect, -0 compares
as equal to +0 when numeric fields and constants are used.
Note: OPTION SZERO or OPTION NOSZERO is ignored for INREC IFTHEN=(WHEN=(logexp),...)
unless the OPTION statement is found in a higher source (for example,
DFSPARM is a higher source than SYSIN) or before the INREC statement
in the same source. For example, NOSZERO will be used in both of
the following cases: - Case 1:
//DFSPARM DD *
OPTION COPY,NOSZERO
/*
//SYSIN DD *
INREC IFTHEN=(WHEN=(1,2,FS,EQ,+0),OVERLAY=(22:C'Yes')),
IFTHEN=(WHEN=NONE,OVERLAY=(22:C'No '))
/*
- Case 2:
//SYSIN DD *
OPTION COPY,NOSZERO
INREC IFTHEN=(WHEN=(1,2,FS,EQ,+0),OVERLAY=(28:C'A')),
IFTHEN=(WHEN=NONE,OVERLAY=(28:C'B'))
/*
|