Convert null value to space.

JES2/3, JCL, utilities.
Previous topicNext topic

Topic Author
Ranjeet Gena
New Member
Posts: 5
Joined: Sat Jan 17, 2015 12:45 pm

Convert null value to space.

Post by Ranjeet Gena » Mon Oct 26, 2015 2:30 pm

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: 119
Joined: Tue Oct 20, 2015 3:20 am
Location: Bloomington, IL

Re: Convert null value to space.

Post by Akatsukami » Mon Oct 26, 2015 2:49 pm

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: 580
Joined: Wed Apr 23, 2014 8:45 pm

Re: Convert null value to space.

Post by nicc » Mon Oct 26, 2015 4:42 pm

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


Topic Author
Ranjeet Gena
New Member
Posts: 5
Joined: Sat Jan 17, 2015 12:45 pm

Re: Convert null value to space.

Post by Ranjeet Gena » Mon Nov 02, 2015 3:47 pm

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: 603
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars
Zodiac: Libra

Re: Convert null value to space.

Post by zprogrammer » Mon Nov 02, 2015 3:49 pm

Thanks for posting the solution Ranjeet


zprogrammer


William Collins
Global Moderator
Global Moderator
Posts: 499
Joined: Sun Aug 25, 2013 7:24 pm

Re: Convert null value to space.

Post by William Collins » Wed Nov 04, 2015 5:08 pm

I hope you don't have any packed-decimal or binary fields in you input.




Topic Author
Ranjeet Gena
New Member
Posts: 5
Joined: Sat Jan 17, 2015 12:45 pm

Re: Convert null value to space.

Post by Ranjeet Gena » Tue Feb 09, 2016 2:15 pm

Hi -

No I had not had those fields in the file.



Previous topicNext topic

Return to “JCL - Job Control Language.”