SORT job
Input records in the EXTRACTO data set must be sorted. When you are converting to a PHDAM database, a SORT job is always required because partition boundaries are based on key range.
When you are converting to a PHIDAM database, a SORT job is required if the following conditions are true:
- The original database is a HDAM database.
- You are combining multiple HIDAM databases that have overlapping key values.
Figure 1 shows JCL for sorting input records.
Figure 1. SORT JCL
000019 //SORT EXEC PGM=SORT,REGION=4096K
000020 //SYSOUT DD SYSOUT=*
000021 //SORTIN DD DISP=SHR,DSN=YOUR.EXTRACTO.DSN
000022 //SORTOUT DD DSN=YOUR.SORTED.DSN,
000023 // SPACE=(CYL,(99,99),RLSE),DISP=(,CATLG),UNIT=(DEVXXX),
000024 //$ORTPARM DD *
000025 VLSHRT
000026 //SYSIN DD *
000027 SORT FIELDS=(9,1,D,17,KL,A),FORMAT=BI <--- KL= DBD ROOT KEY LENGTH
000028 //SORTWK01 DD UNIT=WORK,SPACE=(CYL,(50,19))
000029 //SORTWK02 DD UNIT=WORK,SPACE=(CYL,(50,19))
000030 //SORTWK03 DD UNIT=WORK,SPACE=(CYL,(50,19))
000020 //SYSOUT DD SYSOUT=*
000021 //SORTIN DD DISP=SHR,DSN=YOUR.EXTRACTO.DSN
000022 //SORTOUT DD DSN=YOUR.SORTED.DSN,
000023 // SPACE=(CYL,(99,99),RLSE),DISP=(,CATLG),UNIT=(DEVXXX),
000024 //$ORTPARM DD *
000025 VLSHRT
000026 //SYSIN DD *
000027 SORT FIELDS=(9,1,D,17,KL,A),FORMAT=BI <--- KL= DBD ROOT KEY LENGTH
000028 //SORTWK01 DD UNIT=WORK,SPACE=(CYL,(50,19))
000029 //SORTWK02 DD UNIT=WORK,SPACE=(CYL,(50,19))
000030 //SORTWK03 DD UNIT=WORK,SPACE=(CYL,(50,19))
To obtain the key length value, reference the root segment information in the DBD source. Databases that do not have root keys cannot be partitioned.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*