Convert null value to space.

JES2/3, JCL, utilities.
Post Reply
Ranjeet Gena
New Member
Posts: 5
Joined: Sat Jan 17, 2015 12:45 pm

Convert null value to space.

Post by Ranjeet Gena »

Hi all,

I have created a file with FB/LRECL=200, which is actaully pulled from a database. Because the data comes from the database, the file has gor some embeded null values (x'00'). Can you please suggest a JCL that can convert null (x'00') into spaces (x'40')?

Thanks
User avatar
Akatsukami
Global Moderator
Global Moderator
Posts: 122
Joined: Tue Oct 20, 2015 3:20 am
Location: Bloomington, IL
Contact:

Re: Convert null value to space.

Post by Akatsukami »

JCL cannot do what you ask, as it only establishes environments and executes programs. I recommend using your shop's sort product.
"I come to the conclusion that, men loving according to their own will and fearing according to that of the prince, a wise prince should establish himself on that which is in his own control and not in that of others." -- Niccolò Machiavelli
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Convert null value to space.

Post by nicc »

And with your sort product you could robaby use FINDREP. Any queries should be posted in the part of the forum suitable for your sort product.
Regards
Nic
Ranjeet Gena
New Member
Posts: 5
Joined: Sat Jan 17, 2015 12:45 pm

Re: Convert null value to space.

Post by Ranjeet Gena »

I've used this on the final file. It works for now :

Code: Select all

OPTION COPY 
    INREC FINDREP=(IN=X'00',X'40')
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: Convert null value to space.

Post by zprogrammer »

Thanks for posting the solution Ranjeet
zprogrammer
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Convert null value to space.

Post by William Collins »

I hope you don't have any packed-decimal or binary fields in you input.
Ranjeet Gena
New Member
Posts: 5
Joined: Sat Jan 17, 2015 12:45 pm

Re: Convert null value to space.

Post by Ranjeet Gena »

Hi -

No I had not had those fields in the file.
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.”