Convert null value to space.

JES2/3, JCL, utilities.

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

Convert null value to space.

Postby 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: 105
Joined: Tue Oct 20, 2015 3:20 am
Location: Bloomington, IL
Has thanked: 2 times
Been thanked: 14 times

Re: Convert null value to space.

Postby 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: 544
Joined: Wed Apr 23, 2014 8:45 pm
Been thanked: 11 times

Re: Convert null value to space.

Postby 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.

Postby 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
Has thanked: 7 times
Been thanked: 7 times

Re: Convert null value to space.

Postby 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
Has thanked: 1 time
Been thanked: 25 times

Re: Convert null value to space.

Postby 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.

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

Hi -

No I had not had those fields in the file.




Return to “JCL - Job Control Language.”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 1 guest