JDUPSEQ (Join Duplicate Sequence) Keyword--Join Logical Files Only

Use this join-level keyword to specify the order in which records with duplicate join fields are presented when your program reads a join logical file.

The format of the keyword is:

JDUPSEQ(sequencing-field-name [*DESCEND])

This keyword has no effect on the ordering of unique records. If you do not specify the keyword, the system does not guarantee the order in which records with duplicate join fields are presented.

If more than one JDUPSEQ keyword is specified in one join specification, the order in which you specify the JDUPSEQ keywords determines the order of presentation of duplicate records. This is similar to specifying an additional key field, in that it determines the order in which records with duplicate keys are presented.

This keyword is valid only for join logical files.

In a single join specification, the total length of fields specified as to fields on the JFLD keyword and fields specified on the JDUPSEQ keyword cannot exceed 120 bytes.

The sequencing field name must be a field that (1) exists in the to file for this join specification and (2) has not been specified as a to field on the JFLD keyword for this join specification. The sequencing field name can be a concatenated field or a SST field. The sequencing field name need not be specified in the record format for the join logical file.

Optionally, you can specify *DESCEND to change the order in which duplicate records are presented. Without *DESCEND, duplicate records are presented in the following default sequences: