Null and Spaces in a field

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vijayrc
Participant
Posts: 197
Joined: Sun Apr 02, 2006 10:31 am
Location: NJ

Null and Spaces in a field

Post by vijayrc »

Hi,
I have a field ABC which is X(35) coming from Mainframe wherein the value looks like this in hexadecimal: X'000000000000000000000000000000000000404040404040" in this fashion. This field when it is colum exported gets truncated and causes problem. Is there a way to Handle this using IsNull.

Tried the following:
Moved ABC[1,1] to X(1) temporary field and did a IsNull(temporary field) and it doesn't help.

Any directions on how to crack this?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I am working with columns containing similar values. In my case, I added a filter of "tr '/000' '?'" to replace the 0x000 nulls with question marks in the string.

n.b. 0x000 is NUL, not an SQL NULL!
vijayrc
Participant
Posts: 197
Joined: Sun Apr 02, 2006 10:31 am
Location: NJ

Post by vijayrc »

ArndW wrote:I am working with columns containing similar values. In my case, I added a filter of "tr '/000' '?'" to replace the 0x000 nulls with question marks in the string.

n.b. 0x000 is NUL, not an SQL NULL ...
ArndW,
What I did is take this X(35)'s first two bytes into a single byte field and check for Null as described in the manual [1 + NullToZero[field1] + NullToZero[field2]] and check if the result is 1 for Null...
Thanks for your input though. If you have better way of resolving this, let me know
Post Reply