Need to put records a Sorting order as mentioned below.
Posted: Mon Oct 29, 2012 6:39 pm
Can you pls help to get the records in below order using sort.
eg: Records are like :
04;WEL015;99250112599;FUNDVALUEDTL;ISS;;;;;
03;WEL015;99250112599;FUNDVALUEHDRALLFUNDS;ISS;
04;WEL015;99250121955;FUNDVALUEDTL;ISS;1.0000;08;1.0000;RIVER5
04;WEL015;99250121956;FUNDVALUEDTL;ISS;;06;1.0000;RIVER3
04;WEL015;99250121959;FUNDVALUEDTL;ISS;1.00;01;1.0000;RIVER1
04;WEL015;99250121960;FUNDVALUEDTL;ISS;1.00;02;1.0000;RIVER2
==> We are looking sort these records such that for ";FUNDVALUEDTL" the type codes (08,06,01,02) highlighted in bold; records should be in order as type code 01 then 02 then 06 then rest. Issue here is the position of type code is not fixed but for sure it comes after two semi- columns(;) after b]FUNDVALUEDTL[/b].
We thought below sort but not able to collect what exactly should be there after WHEN condition.?????
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(27,13,CH,EQ,C'FUNDVALUEDTL;')
SORT FIELDS=(???????????????????))
OUTREC FIELDS=(1:5,3004)
Thanks in advance.
eg: Records are like :
04;WEL015;99250112599;FUNDVALUEDTL;ISS;;;;;
03;WEL015;99250112599;FUNDVALUEHDRALLFUNDS;ISS;
04;WEL015;99250121955;FUNDVALUEDTL;ISS;1.0000;08;1.0000;RIVER5
04;WEL015;99250121956;FUNDVALUEDTL;ISS;;06;1.0000;RIVER3
04;WEL015;99250121959;FUNDVALUEDTL;ISS;1.00;01;1.0000;RIVER1
04;WEL015;99250121960;FUNDVALUEDTL;ISS;1.00;02;1.0000;RIVER2
==> We are looking sort these records such that for ";FUNDVALUEDTL" the type codes (08,06,01,02) highlighted in bold; records should be in order as type code 01 then 02 then 06 then rest. Issue here is the position of type code is not fixed but for sure it comes after two semi- columns(;) after b]FUNDVALUEDTL[/b].
We thought below sort but not able to collect what exactly should be there after WHEN condition.?????
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(27,13,CH,EQ,C'FUNDVALUEDTL;')
SORT FIELDS=(???????????????????))
OUTREC FIELDS=(1:5,3004)
Thanks in advance.