I am having two sort cards. In I/P file 309 position account number is there. AFter first sort step it moved to 314 position. Again one more sort cord used to sort based on account number. ( after formating).
I planned to merge both steps to reduce redundancy. Instead of outrec i used inrec and sorted based on 314,23 position. Because first it formats the records by using inrec. AFter inrec the account number will be available in 314 position. after that sorting the records based on acc.number. The job is running sucessfully and i compared the results.
Some records are varing. Data is not matching.
1St sort card:
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,302,
303:338,5,
308:303,35,
343:C'1',
554:343,35,
650:C'00001')
END
and
SORT FIELDS=(314,23,CH,A),
DYNALLOC=(SYSDA,199)
END
I merged both, job ran fine. i comared O/p files. Few records are varing. I not able to find the exact reason. Can any one help me.
MEGER card:
SORT FIELDS=(314,23,CH,A),
DYNALLOC=(SYSDA,199)
INREC FIELDS=(1:1,302,
303:338,5,
308:303,35,
343:C'1',
554:343,35,
650:C'00001')
END
Need to merge two sort steps to reduce redundancy in JCL
Moderators: Frank Yaeger, DikDude, Moderator Group
-
- Member
- Posts: 1
- Joined: Fri Jan 25, 2013 11:55 am
Need to merge two sort steps to reduce redundancy in JCL
Last edited by balu.jonty on Sat Jan 26, 2013 11:56 am, edited 1 time in total.
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
Code: Select all
INREC BUILD=(1,302,
338,5,
303,35,
C'1',
554:343,35,
650:C'00001')
SORT FIELDS=(314,23,CH,A),
DYNALLOC=(SYSDA,199)
I've used BUILD instead of the ageing and overloaded FIELDS. There is no reason that this should not "work".
However, since you didn't exactly say what was wrong, it is pointless guessing. You are, by specifying non-contiguous columns, leaving large "gaps" in your records.
Judging by your DYNALLOC you have enormous datasets. Yes, there will be considerable saving (CPU, elapsed, EXCP) from combining the steps, but to do so, you need the correct output.
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