JCL FINDREP a field in a variable len record with delimiters

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
may132012
Member
Posts: 1
Joined: Fri Jan 05, 2018 1:23 am

JCL FINDREP a field in a variable len record with delimiters

Post by may132012 » Fri Jan 05, 2018 1:32 am

I have a variable length file VB 8196 example format as follows, delimiters are pipes:

AAA4050000000C02005AE222E617D300|01.09.2017|N|123456789012|0010|00000000000000000000245.74000000|0010|0010123456
AAA4050000000C02005AE222E617D300|01.09.2017|N||0010|00000000000000000000245.74000000|0010|0010123456
AAA4050000000C02005AE222E617D300|01.09.2017|N|123456789012|0010|00000000000000000000245.74000000|0010|0010123456
AAA4050000000C02005AE222E617D300|||123456789012|0010|00000000000000000000245.74000000|0010|0010123456

I want to zeroise out the 6th field of every record (an amount field), which I know to be always the field after the 5th ‘pipe’.
Can I use FINDREP to achieve this? I'm looking for the simplest method obviously.

Post Reply

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



Other References
Mainframe Tools and others