Page 1 of 1

add preceding zeroes to the records in JCL.

Posted: Fri Dec 31, 2021 12:44 pm
by Rudhra
Hi all
I have one variable let's say customer number
Actual length is 7 digits
If if is having less than 7 digits then I should add preceding zeroes
How can we get this in jcl??
Ex:
I/p:10561
O/p:0010561

Can someone help me?

Re: add preceding zeroes to the records in JCL.

Posted: Sat Jan 01, 2022 1:20 am
by Robert Sample
Sorry, but you CANNOT do this with JCL. JCL sets up environments and executes programs and that is all it does. If you had said you wanted to use SORT or a program to add the zeroes -- that could be done. But with JCL it cannot be done.