Need to put records a Sorting order as mentioned below.
Moderators: Frank Yaeger, Moderator Group
Need to put records a Sorting order as mentioned below.
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.
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
congratulations,
apparently William was able to point you in the
right direction
so that you could learn, yourself, how to accomplish the task!
That makes responding to questions enjoyable.
Not only have we shared,
but someone is well on their way to sharing, also.
apparently William was able to point you in the
right direction
so that you could learn, yourself, how to accomplish the task!
That makes responding to questions enjoyable.
Not only have we shared,
but someone is well on their way to sharing, also.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page