JCL FINDREP a field in a variable len record with delimiters
Posted: 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.
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.