Page 1 of 1

Convert null value to space.

Posted: Mon Oct 26, 2015 2:30 pm
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

Re: Convert null value to space.

Posted: Mon Oct 26, 2015 2:49 pm
by Akatsukami
JCL cannot do what you ask, as it only establishes environments and executes programs. I recommend using your shop's sort product.

Re: Convert null value to space.

Posted: Mon Oct 26, 2015 4:42 pm
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.

Re: Convert null value to space.

Posted: Mon Nov 02, 2015 3:47 pm
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')

Re: Convert null value to space.

Posted: Mon Nov 02, 2015 3:49 pm
by zprogrammer
Thanks for posting the solution Ranjeet

Re: Convert null value to space.

Posted: Wed Nov 04, 2015 5:08 pm
by William Collins
I hope you don't have any packed-decimal or binary fields in you input.

Re: Convert null value to space.

Posted: Tue Feb 09, 2016 2:15 pm
by Ranjeet Gena
Hi -

No I had not had those fields in the file.