As preamble, I've been to the Syncsort manual and tried several examples (and several more plucked from search engine results), but when Syncsort inserts a value in the respective columns, it pushes all the data after the inserted character 1 column to the right, whereas I just want the commas inserted in place so the file length doesn't change.
Here's what my input looks like:
AAAAA 9999 2022 9 AA 00000000 1234567890456
AAAAA 9999 2022 9 AA 00000000 1234567890456
AAAAA 9999 2022 9 AA 00000000 1234567890456
AAAAA 9999 2022 9 AA 00000000 1234567890456
AAAAA 9999 2022 9 AA 00000000 1234567890456
AAAAA 9999 2022 9 AA 00000000 1234567890456
AAAAA 9999 2022 9 AA 00000000 1234567890456
AAAAA 9999 2022 9 AA 00000000 1234567890456
AAAAA 9999 2022 9 AA 00000000 1234567890456
AAAAA 9999 2022 9 AA 00000000 1234567890456
Here's what my sort step looks like:
//STEP0010 EXEC PGM=SORT
//SORTIN DD DSN=MERGED.SORTED.INPUT,DISP=SHR
//SYSOUT DD SYSOUT=*
//SORTOUT DD DSN=MERGED.SORTED.OUTFILE,
// DISP=(,CATLG,DELETE),
// SPACE=(TRK,(150,300),RLSE),
// DSB=*.SORTIN
//SYSIN DD
SORT FIELDS=COPY
OUTREC FIELDS=(1,72,
6:C',',
12:C',',
27:C',',
40:C',',
44:C',',
60:C',')
Here's my desired output (column positions are approximate):
AAAAA, 9999, 2022, 9, AA, 00000000, 1234567890456
AAAAA, 9999, 2022, 9, AA, 00000000, 1234567890456
AAAAA, 9999, 2022, 9, AA, 00000000, 1234567890456
AAAAA, 9999, 2022, 9, AA, 00000000, 1234567890456
AAAAA, 9999, 2022, 9, AA, 00000000, 1234567890456
AAAAA, 9999, 2022, 9, AA, 00000000, 1234567890456
AAAAA, 9999, 2022, 9, AA, 00000000, 1234567890456
AAAAA, 9999, 2022, 9, AA, 00000000, 1234567890456
AAAAA, 9999, 2022, 9, AA, 00000000, 1234567890456
AAAAA, 9999, 2022, 9, AA, 00000000, 1234567890456
Here's what I get instead of desired output (the delimiters I wanted but the data gone):
, , , , , ,
, , , , , ,
, , , , , ,
, , , , , ,
, , , , , ,
, , , , , ,
, , , , , ,
My last shot was adding the "1,72" parm values to the sort card indicating I wanted to retain the data in columns 1 thru 72 while inserting the commas, but Syncsort didn't see it that way.
I feel like there's one eensy-weensy change to the sort card that will resolve this that I just haven't stumbled onto yet.
Hope this has illustrated my issue clearly. Thanks!