Post #1
0 votes
Sam
Reputation5
Posts: 28
Joined: 07/01/2026, 02:30 PM
Posted: 07/25/2026, 01:51 PM
Need to sort a FB file by account number in columns 1-8. Is this a whole COBOL program or can JCL do it?
Need to sort a FB file by account number in columns 1-8. Is this a whole COBOL program or can JCL do it?
JCL + DFSORT. Roughly:
//SORT STEP EXEC PGM=SORT
//SORTIN DD DSN=your.in,DISP=SHR
//SORTOUT DD DSN=your.out,DISP=(NEW,CATLG,DELETE)...
//SYSIN DD *
SORT FIELDS=(1,8,CH,A)
/*
Ask ops for a sample with your site's SPACE defaults filled in.
CH = character. If it is packed decimal the format code changes. Start with CH for practice files.
You must be signed in to reply to this thread