Sorting data sets
You can use DFSORT to rearrange the records in your data sets. Sorting is arranging records in either ascending or descending order within a file. Table 1 shows a sample data set of names, first sorted in ascending order, then in descending order.
Unsorted
Data Set |
Sorted
Ascending |
Sorted
Descending |
---|---|---|
Andy
Edward Carol Dan Betty |
Andy
Betty Carol Dan Edward |
Edward
Dan Carol Betty Andy |
You can sort data in many different formats. Table 2 shows the most commonly used DFSORT data formats and the format identifiers you use to specify them.
Data Format
|
Format Identifier
|
---|---|
EBCDIC (Character)
Binary (Unsigned Numeric) Fixed-point (Signed Numeric) Zoned Decimal (Signed Numeric) Packed Decimal (Signed Numeric) Floating Sign (Signed Numeric) Free Form (Unsigned Numeric) Free Form (Signed Numeric) |
CH
BI FI ZD PD FS UFF SFF |
Refer to z/OS DFSORT Application Programming Guide for complete details of the available formats.