Replace a character using JCL and SORT.

IBM's Sort Product, ICETOOL, ICEMAN and ICEGENER.
Post Reply
Vicky Malhotra
Registered Member
Posts: 11
Joined: Fri Jan 17, 2014 6:57 pm

Replace a character using JCL and SORT.

Post by Vicky Malhotra »

Hello all,

can someone help me to resolve a query.

I got a dataset, and i wanna replace the 1st column Value from X to Y.
For ex. Current Value in dataset is X9010
Output i need is Y9010
How can I do this using the JCL sort statement pls.
I think Overlay can be used but am not getting how to use overlay with Sort.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Replace a character using JCL and SORT.

Post by Anuj Dhawan »

Look for FINDREP, a sample is given below:

Code: Select all

//SYSIN DD *                           
 OPTION COPY                           
 OUTREC FINDREP=(IN=C'X',OUT=C'Y')
Play around with position of characters you want to replace, should work.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
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 “IBM DFSort, ICETOOL, ICEMAN, ICEGENER.”