View previous topic :: View next topic
|
Author |
Message |
dmithunibm
New User
Joined: 23 May 2007 Posts: 18 Location: Bangalore
|
|
|
|
Hello All,
Can anyone help me in the below issue.
'How to read a NULL value from an IMS Database segment through PLI programming.' |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
can You please elucubrate on the meaning of NULL |
|
Back to top |
|
|
dmithunibm
New User
Joined: 23 May 2007 Posts: 18 Location: Bangalore
|
|
|
|
We all know that in DB2 easily we can find out the columns with NULL.(.....WHERE COLNAME = 'NULL').
But what I wanted to know is whether there is a way of doing the same thing in IMS DB also. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
You should remember that IMS/DB is not COLUMN/FIELD oriented,
it is SEGMENT/RECORD oriented
the only case were fields ( real or virtual ) are being define to IMS ( rough approach )
is when keys ( and similar ) are defined |
|
Back to top |
|
|
dmithunibm
New User
Joined: 23 May 2007 Posts: 18 Location: Bangalore
|
|
|
|
Hi Enrico,
I can understand.
But how to proceed in the case when there is a need to read an IMS Segment having a NULL value in one of it's fields.
Is it possible to have NULL value in any of the segment fields ?
Can you please explain me the same. |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi,
there is no NULL concept in IMS data base |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
a NULL column is defined by conventions and additional info managed by the DB2 infrastructure
You must define Your own concept of NULL field for a record/segment oriented infrastructure
an approach would be for every nullable field to add into the segment/record a flag telling the fact,
but then You would have to add the logic for managing the null indicators
if Your application really need a NULLABLE entity I would meditate on using a segment on its own,
if the segment is not there then the entity is null, otherwise ....
To nullify such a field it would simply mean to delete the appriate segment |
|
Back to top |
|
|
dmithunibm
New User
Joined: 23 May 2007 Posts: 18 Location: Bangalore
|
|
|
|
Hi Enrico,Vasanth,
Thanks a lot for your valuable info :-)
Thanks & Regards,
Mithun. |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
In some of our applications spaces in an otherwise numeric field is used to indicate "null" ie. sufficient data is not available to calculate the value for this field. This is different from the value being calculated as zero. In many ways I do not like this, but it fills the business need. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Quote: |
In some of our applications spaces in an otherwise numeric field is used to indicate "null" |
And an occasional 0c7 for the unwary. . . |
|
Back to top |
|
|
|