-
If NOEQUALS is in effect, the record which is retained is determined arbitrarily. If EQUALS is in effect, the record which is retained is the first record read in a SORT application; in a MERGE, the retained record will be from the lowest-numbered input file. The EQUALS parameter can be specified on the SORT or MERGE control statement or as a PARM option.
-
A sort or merge control field cannot be summed. A portion of a control field cannot be included in a sum field.
-
Sum fields may not overlap each other.
-
Non-sum fields remain unchanged and are retained from the record which contains the sum.
-
If arithmetic overflow or underflow occurs during the summing of two records, those records are not summed and neither record is deleted. Further processing is determined by the option selected at installation through the SUMOVFL parameter or the run-time parameter OVFLO. If the RC16 option of this parameter has been selected, processing will terminate with a WER049A critical error. For the RC0 (the delivered default) or the RC4 option, sum processing will continue and a WER049I message will be issued (only for the first occurrence). If a subsequent pair of records with equal control fields can be summed without causing overflow or underflow, they will be summed. To avoid arithmetic overflow, use the INREC control statement to insert zeros of the proper format immediately before the sum field. For example, for a PD field, use nZ to insert binary zeros.
-
Remember that the first 4 bytes of variable-length records are reserved for the Record Descriptor Word, so the first byte of the data portion of the record is byte 5.
-
SUM is incompatible with an incore sort. If you specify the SUM control statement, allocate SORTWKxx data sets in the JCL or use the DYNALLOC feature for dynamic SORTWK allocation. If no JCL SORTWKs are provided and DYNALLOC is disabled by default, SUM will cause DYNALLOC to be enabled.
-
When FL fields are summed, user-issued SPIE macros are not permitted and exit routines must not produce exponent overflow or underflow. Because of the numeric rounding performed by the hardware, the exact sum depends on the order in which fields are summed. Thus, the sum may vary slightly for different executions.
-
By default, the sign byte of a positive summed ZD field will be converted to printable format. If you want to disable this action, use the NZDPRINT PARM option. Refer to ZDPRINT.