Combining two sort cards
Page 1 of 1
Combining two sort cards
Hi,
Can we put some effective logic to combine the below SORT Cards to avoid redundancy and improve maintainability. May be use SYMBOLS.
The difference between the 2 SORT Cards are highlighted in RED.
SORT CARD 1: -
SORT FIELDS=(1,22,CH,A)
OMIT COND=(1,3,CH,EQ,C'999')
OUTREC FIELDS=(1:1,3,
4:4,19,
23:23,3,
26:48,19,
45:109,3,
48:115,3,
51:118,19,
70:137,1,
.
.
.
1501:C'22')
There are around 1000 such fields mentioned in the OUTREC and in the end we append 22.
SORT CARD 2: -
SORT FIELDS=(1,22,CH,A)
OMIT COND=(1,3,CH,EQ,C'000',OR,1,3,CH,EQ,C'999')OUTREC FIELDS=(1:1,3,
4:4,19,
23:23,3,
26:48,19,
45:109,3,
48:115,3,
51:118,19,
70:137,1,
.
.
.
.
.
.
1501:C'11')
There are around 1000 such fields mentioned in the OUTREC (which is exactly same as that of SORT CARD 1) and in the end we append 11.
Can we put some effective logic to combine the below SORT Cards to avoid redundancy and improve maintainability. May be use SYMBOLS.
The difference between the 2 SORT Cards are highlighted in RED.
SORT CARD 1: -
SORT FIELDS=(1,22,CH,A)
OMIT COND=(1,3,CH,EQ,C'999')
OUTREC FIELDS=(1:1,3,
4:4,19,
23:23,3,
26:48,19,
45:109,3,
48:115,3,
51:118,19,
70:137,1,
.
.
.
1501:C'22')
There are around 1000 such fields mentioned in the OUTREC and in the end we append 22.
SORT CARD 2: -
SORT FIELDS=(1,22,CH,A)
OMIT COND=(1,3,CH,EQ,C'000',OR,1,3,CH,EQ,C'999')OUTREC FIELDS=(1:1,3,
4:4,19,
23:23,3,
26:48,19,
45:109,3,
48:115,3,
51:118,19,
70:137,1,
.
.
.
.
.
.
1501:C'11')
There are around 1000 such fields mentioned in the OUTREC (which is exactly same as that of SORT CARD 1) and in the end we append 11.
kasthuri- Posts : 212
Join date : 2013-01-27
Similar topics
» what are different options to sort records?
» Sort a file based on a field whose position is not fixed
» Sort a file based on a field whose position is not fixed
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|