View previous topic :: View next topic
|
Author |
Message |
maverick05
New User
Joined: 14 Apr 2005 Posts: 54 Location: Earth
|
|
|
|
Hi,
I have a DB2 table for which i have to extract data and format it and load it to output file.
I have a nullable column in the Db2 table.How to handle/write outrec fields for this column
EX: OUTREC FIELDS=(1,5,912,C'EQS',6,1)
As per the above assume that nullable column in input record is at 6th position of 1 byte column.How to put nullable field here?
thanks |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hello,
I believe the concept of NULL fields does not make any sense in the case of files. You can't write a NULL field as NULL in DB2 means "the value is unknown". How will you write something out of nothing? |
|
Back to top |
|
|
maverick05
New User
Joined: 14 Apr 2005 Posts: 54 Location: Earth
|
|
|
|
Well,i got the answer.We need to use X'40' for the extra null column at the end of output sortrec utilised for DB2 nullable field
Tx |
|
Back to top |
|
|
samuel_Inba
New User
Joined: 03 Jan 2008 Posts: 53 Location: Chennai
|
|
|
|
FYA.
X'40' doesnt represent null.. .its just the hex value of space... dont misunderstand... Space is NOT equal to NULL.
Regards,
Sam. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
the NULL issue has been going on and on,
until people understand the NULL concept there is little we can do to help
to keep it short
the content of a field is always a value..
to represent NULLness You need two fields
a data field which contains ( possibly ) the ... data ...
a flag which tells if any data exists
giving to some content of the field the meaning of nullness is a local convention
the only generally used convention for nullness is the pointer convention
of C language a pointer containing a 0 is NULL poiner ( does not point anywhere) |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
the only generally used convention for nullness is the pointer convention
of C language a pointer containing a 0 is NULL poiner ( does not point anywhere) |
So, it's pointless really |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
the only generally used convention for nullness is the pointer convention
of C language a pointer containing a 0 is NULL poiner ( does not point anywhere)
So, it's pointless really |
It's too early in the day here to run across this without warning ... we need another emoticon for these things so people would know they're coming. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
OK, how about
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Quote: |
So, it's pointless really |
Or pointerless. . .
Quote: |
It's too early in the day here to run across this without warning ... we need another emoticon for these things so people would know they're coming. |
This emoticon would hopefully contain an audible as well?
d |
|
Back to top |
|
|
|