🖥 JCL
JCL SORT Utility - DFSORT
Intermediate 🕑 15 min read
👁 0 views
18
Code Example
## JCL SORT Utility - DFSORT
DFSORT (ICEMAN) sorts, merges, copies, and transforms data with powerful control statements.
### Standard DD Names
| DD Name | Purpose |
|---------|---------|
| SORTIN | Input file(s) |
| SORTOUT | Output file |
| SYSIN | Control statements |
| SYSOUT | Messages |
| SORTWKnn | Work files |
### SORT Statement
\`\`\`
SORT FIELDS=(start,length,format,order,...)
\`\`\`
### Field Formats
| Format | Description |
|--------|-------------|
| CH | Character |
| ZD | Zoned decimal |
| PD | Packed decimal |
| BI | Binary |
| FI | Fixed-point |
### Order
- A: Ascending
- D: Descending
### Include/Omit Records
\`\`\`
INCLUDE COND=(start,length,format,operator,value)
OMIT COND=(start,length,format,operator,value)
\`\`\`
### Operators
EQ, NE, GT, GE, LT, LE, AND, OR
### OUTREC - Reformatting
\`\`\`
OUTREC FIELDS=(start:length,...)
\`\`\`