By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,514 Members | 1,717 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,514 IT Pros & Developers. It's quick & easy.

DSNTIAUL - Unload a Table that has a Null Ind

P: n/a
I'm unloading a Table that has two columns that allow nulls. One
column is null, the other is not. I have the following questions on
the output that I am seeing in the unloaded file....

1) The null indicator field for the column that is not null
contains x'00'... is this correct?

2) The null indicator field for the column that is null
contains a "?"... is this correct? (I expected "-1")

3) In both of the about, the field that is the null indicator
comes AFTER the null field... I was expecting it to be
BEFORE. In fact the IBM Utility manual says it will
appear BEFORE the field it represents.

Can anyone provide an explaination..? Am I doing something wrong?
Thanks
Tom

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"TomD" <td*****@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I'm unloading a Table that has two columns that allow nulls. One
column is null, the other is not. I have the following questions on
the output that I am seeing in the unloaded file....

1) The null indicator field for the column that is not null
contains x'00'... is this correct?

2) The null indicator field for the column that is null
contains a "?"... is this correct? (I expected "-1")

3) In both of the about, the field that is the null indicator
comes AFTER the null field... I was expecting it to be
BEFORE. In fact the IBM Utility manual says it will
appear BEFORE the field it represents.

Can anyone provide an explaination..? Am I doing something wrong?

Thanks

Tom


When a null indicator is returned to the application program from a nullable
column in DB2, it takes up a half-word binary. This is true even if DB2 only
uses 1 byte internally when the data is stored on disk.

The null indicator is after the data when returned to the program, even if
it is before the data when stored internally on disk by DB2.

Therefore, I would assume (without looking at the manual) that the output
from DSNTIAUL would be PIC S9(4) COMP after the data if you were using a
COBOL record layout. A half-word binary takes two bytes and is stored in
hex.

I hope you know that you have read binary values in Hex, which you are not
doing if you see a "?".
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.