my requirement is like, I have a file below:
1.6.1.9.6?2. 196CIF2010028
500000000012 6196M1ACC00C
600000000007 5422239000000003
500000000013 6196M1ACC00C
600000000010 5422239000000052
500000000007 6196M1ACC00C
600000000012 5422231903255487
500000000010 6196M1ACC00C
600000000013 5422239000000078
600000000013 5422239000000078
600000000016 5408769000000007
500000000016 6196M2AGC00C
9.6.1.9.6?2. 196CIF0000073200
And I want the output file in sorted order on the basis on account number (position 2,length 11) and then record-type(position 1, length 1), keeping header and trailer records at the same position (i mean header on very first record and trailer on last record).
Please help.
sorting data file (keeping header and trailer on same posi.)
Moderators: Frank Yaeger, Moderator Group
the output file would be like :
1.6.1.9.6?2. 196CIF2010028
500000000007 6196M1ACC00C
600000000007 5422239000000003
500000000010 6196M1ACC00C
600000000010 5422239000000052
500000000012 6196M1ACC00C
600000000012 5422231903255487
500000000013 6196M1ACC00C
600000000013 5422239000000078
600000000013 5422239000000078
500000000016 6196M2AGC00C
600000000016 5408769000000007
9.6.1.9.6?2. 196CIF0000073200
1.6.1.9.6?2. 196CIF2010028
500000000007 6196M1ACC00C
600000000007 5422239000000003
500000000010 6196M1ACC00C
600000000010 5422239000000052
500000000012 6196M1ACC00C
600000000012 5422231903255487
500000000013 6196M1ACC00C
600000000013 5422239000000078
600000000013 5422239000000078
500000000016 6196M2AGC00C
600000000016 5408769000000007
9.6.1.9.6?2. 196CIF0000073200
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
Here's a DFSORT/ICETOOL job that will do what you asked for:
Code: Select all
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT DD DSN=... output file
//TOOLIN DD *
DATASORT FROM(IN) TO(OUT) HEADER TRAILER USING(CTL1)
/*
//CTL1CNTL DD *
SORT FIELDS=(2,11,CH,A,1,1,CH,A)
/*
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
That statement makes no sense. If you have DFSORT installed, then you have DFSORT's ICETOOL. ICETOOL has been shipped with DFSORT since 1991! Did you actually try the job I posted? If it didn't work, you may be downlevel in DFSORT functional PTFs. See the following:we do not have ICETOOL installed in our system,
http://www.mainframegurukul.com/ibmmain ... php?t=3982
I did. ICETOOL is part of DFSORT.Could you please provide me the solution in normal DFSORT.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
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