View previous topic :: View next topic |
Author |
Message |
arvibala Beginner
Joined: 12 Feb 2008 Posts: 142 Topics: 67
|
Posted: Mon Jul 20, 2009 8:11 pm Post subject: Jcl to Convert Null to Space |
|
|
Hi all,
I have a flat file (FB 200) created from database extract. The file has embeded Null values (x'00'). This is causing problem. Can we have a simple JCL that converts all Null (x'00') into space (x'40')?
Thanks _________________ Arvind
"You can make a difference with your smile. Have that with you always" |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
arvibala Beginner
Joined: 12 Feb 2008 Posts: 142 Topics: 67
|
Posted: Mon Jul 20, 2009 9:33 pm Post subject: |
|
|
Thanks Kolusu,
I did search using NULL, didnot find any and thats the reason posted. Thanks again _________________ Arvind
"You can make a difference with your smile. Have that with you always" |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Jul 21, 2009 1:17 am Post subject: |
|
|
that's because NULL is not the correct word to use: low-values or binary zeroes is the term you are looking for. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
arvibala Beginner
Joined: 12 Feb 2008 Posts: 142 Topics: 67
|
Posted: Tue Jul 21, 2009 8:30 am Post subject: |
|
|
Thanks All for the Help. I have to use the search effectively.
I have few concerns. This is an IDMS database extract. In what cases these low values or binary zeros appear? If they do any correction in Online region, can these happen?
And If a particular field is a numeric field and it has a Low value, I cant blindly convert that to Space using above code .. correct? To be efficient, I had to write a COBOL / EZT code.
Pls suggest if there is any alternative in JCL? _________________ Arvind
"You can make a difference with your smile. Have that with you always" |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Jul 21, 2009 11:26 am Post subject: |
|
|
arvibala wrote: | And If a particular field is a numeric field and it has a Low value, I cant blindly convert that to Space using above code .. correct? To be efficient, I had to write a COBOL / EZT code. |
arvibala,
I have no clue as to how binary zeros would appear in IDMS but you need to real careful replacing the binary zeros with spaces as you may mess up packed or binary fields that have hex zeros in the first couple of bytes.
Quote: | Pls suggest if there is any alternative in JCL? |
The above suggested solutions are indeed very efficient solutions. You can limit your replacement of low values to spaces only for character data.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
arvibala Beginner
Joined: 12 Feb 2008 Posts: 142 Topics: 67
|
Posted: Wed Jul 22, 2009 7:23 am Post subject: |
|
|
Thanks Kolusu.
With these tips, I will make an efficient code. _________________ Arvind
"You can make a difference with your smile. Have that with you always" |
|
Back to top |
|
|
|
|