Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Equivalent representation of Null in Table Unload

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
Puspojit

New User


Joined: 10 Mar 2008
Posts: 35
Location: Pune

PostPosted: Mon May 05, 2008 4:23 pm    Post subject: Equivalent representation of Null in Table Unload
Reply with quote

Hi,

I am performing a Table Unload through high performance utility.
The nullable fields are replaced with spaces after I perform the
Unload operation.Could any one advise me how to replace them with
spaces. I want Low values instead of spaces in those columns having null.
Currently I am using a sort step to achieve the same.....is there any smarter way through DB2 ?

Regards,
Puspojit
Back to top
View user's profile Send private message
References
PostPosted: Mon May 05, 2008 4:23 pm    Post subject: Re: Equivalent representation of Null in Table Unload Reply with quote

stodolas

Senior Member


Joined: 13 Jun 2007
Posts: 646
Location: Wisconsin

PostPosted: Mon May 05, 2008 5:23 pm    Post subject:
Reply with quote

Null is indicated not by spaces, but by a 1 byte field directly before the unloaded field, the value of it indicates whether or not the field is null. You don't need low values or spaces in the field, just check that 1 byte and you'll know what you need.
Back to top
View user's profile Send private message
Puspojit

New User


Joined: 10 Mar 2008
Posts: 35
Location: Pune

PostPosted: Mon May 05, 2008 5:46 pm    Post subject: Reply to: Equivalent representation of Null in Table Unload
Reply with quote

Hi,
I m sorry I could not make myself clear
I know that null is indicated by one byte field,the null indicator....My question is suppose for a 5 byte nullable column, after I unload it and a Null value was present in the table,then its equivalent in the file would be
5 bytes of spaces and 1 byte for Null indiactor . My question is if there is any way I can change these five spaces to low values during the table unload ?
I am using INZUTILB for the download.

Regards,
Puspojit
Back to top
View user's profile Send private message
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1495
Location: germany

PostPosted: Mon May 05, 2008 6:01 pm    Post subject:
Reply with quote

why go to that problem? The null indicator (as steve inidicated) is your interrogation point. what if the column for one row is not null, but contains x'00's? you could only tell the difference if you check the null inidcator.

INZUTILB - do a google to get the ibm website concerning this utility and RTFM. do not know (or care) if casting/case expressions are legal with this utility.
Back to top
View user's profile Send private message
Puspojit

New User


Joined: 10 Mar 2008
Posts: 35
Location: Pune

PostPosted: Mon May 05, 2008 7:46 pm    Post subject: Reply to: Equivalent representation of Null in Table Unload
Reply with quote

Hi,

Case and Casting are allowed with INZUTILB utility....But they have not served my purpose .....
Anyways, could there be low values in a Table because a Date column or
say a numeric column would not allow a data to be entered defying its required datatype. And as far as char and varchar are concerned, it can be taken care through the case statement....Please correct me if I am wrong.

Regards,
Puspojit.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1495
Location: germany

PostPosted: Tue May 06, 2008 11:14 am    Post subject:
Reply with quote

you are wrong.

Quote:

Anyways, could there be low values in a Table because a Date column or
say a numeric column would not allow a data to be entered defying its required datatype


then no row would be inserted, or column updated. If nullable column is NULL, then it was set to NULL during insert or update, intentionally by the populator of that colum, not because the value presented as potential column data was invalid.

appears you need to do a little reading about nullable columns.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1