Hi,
Can someone please help me regarding my below query?
I got stuck with the parsing of below copybook layout.
01 EX-Field OCCURS 75 times.
10 Field3 PIC X(04).
10 Field4 PIC 9(10).
10 Field5 PIC X(24).
10 Field6 PIC X(17).
My input file has data like below:
HeaderYYYYMMDD
NField1~Field2~Field3(1)~Field4(1)~Field5(1)~Field6(1)~Field3(2)~Field4(2)~Field5(2)~Field6(2)
VField1Datatype~Field2Datatype~Field3(1)Datatype~Field4(1)Datatype~Field5(1)Datatype~Field6(1)Datatype~Field3(2)Datatype and so on
D111~abcd~G12~~~H773 and so on
D2222~abc~G443~H553~G663~H774 and so on
Trailer0002
I used REPEAT in the case if Field3, Field4, Field5, Field6 occurs 2 times and so I used below card
OUTREC PARSE=(%1=(ENDBEFR=C'~',FIXLEN=24,REPEAT=8)),
BUILD=(%1,%2,%3,%4,%5,%6,%7,%8)
But in case of OCCURS 75 times, 75 * 4 = %300 which is exceeding limit of %100.
I thought of using temporary data sets but its of too much complexity.
Please help me to achieve this. I would be grateful for your help.
PARSE more than 100 fields
Moderators: Frank Yaeger, Moderator Group
-
- Member
- Posts: 8
- Joined: Thu Jan 28, 2016 3:31 pm
PARSE more than 100 fields
Thanks,
Srikrishna
Srikrishna
-
- Member
- Posts: 8
- Joined: Thu Jan 28, 2016 3:31 pm
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
-
- Member
- Posts: 8
- Joined: Thu Jan 28, 2016 3:31 pm
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
Don't worry, you mentioned it previously. If SyncSORT has only 99 PARSEd fields, there's a problem with the approach.
You could consider writing a COBOL E15 exit.
Or you could continue, with a multi-step approach.
Whichever, make sure you have everything nailed-down and designed before you start coding.
You could consider writing a COBOL E15 exit.
Or you could continue, with a multi-step approach.
Whichever, make sure you have everything nailed-down and designed before you start coding.
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