Post #1
0 votes
Sam
Reputation
5
Posts: 28
Joined: Jul 1, 2026, 2:30 PM
Posted: Jul 25, 2026, 1: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