z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


OUTREC statement notes

z/OS DFSORT Application Programming Guide
SC23-6878-00

  • If input records are reformatted by INREC or E15, OUTREC must refer to fields in the appropriate reformatted record (see INREC statement notes).
  • When you specify OUTREC, you must be aware of the change in record size and layout of the resulting reformatted output records.
  • If the SORTOUT LRECL is specified or available, DFSORT will use it even if it does not match the reformatted OUTREC record length; this can cause padding or truncation of the reformatted OUTREC records, or termination. If the SORTOUT LRECL is not specified or available, DFSORT can automatically use the reformatted OUTREC record length as the SORTOUT LRECL, when appropriate. See the discussion of the SOLRF and NOSOLRF options in OPTION control statement for details.

    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 more than the LRECL when processing variable-length records. See VSAM considerations for more information.

  • For variable-length records, the first entry in the FIELDS, BUILD, or IFTHEN BUILD parameter must specify or include the unedited 4-byte 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.
  • 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 as the last part. In this case, a value must be specified for pn that is less than or equal to the minimum record length (RECORD statement L4 value) plus 1 byte, and mn and an must be omitted. For example,
      OUTREC 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. OVERLAY or IFTHEN, and FIELDS or BUILD, can differ with respect to position-only. See INREC statement notes for more details.
  • If the reformatted record includes only the RDW and the variable part of the input record, "null" records containing only an RDW may result.
  • The reformatted output records are in the format specified by OUTREC regardless of whether INREC was specified.
  • Fields referenced in OUTREC statements can overlap each other or control fields.
  • If input is variable records, the output is also variable. This means that each record is given the correct RDW by DFSORT before output.
  • When OUTREC is specified, your E35 user exit routine must refer to fields in the reformatted output record.
  • DFSORT issues a message and terminates processing if an OUTREC statement is specified for a tape work data set sort or conventional merge application.
  • When you specify OUTREC, VLSHRT is not used. If VLSHRT is specified, it is ignored.
  • 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 OUTREC 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 OUTREC 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 *
        OUTREC 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
        OUTREC IFTHEN=(WHEN=(1,2,FS,EQ,+0),OVERLAY=(28:C'A')),
               IFTHEN=(WHEN=NONE,OVERLAY=(28:C'B'))
      /*

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014