add preceding zeroes to the records in JCL.

JES2/3, JCL, utilities.
Post Reply
Rudhra
Registered Member
Posts: 11
Joined: Wed Dec 18, 2013 10:17 am

add preceding zeroes to the records in JCL.

Post 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?
Thanks,
Rudhra
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: add preceding zeroes to the records in JCL.

Post 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.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”