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
 
How to read a 'NULL' value from an IMS DB Segment

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
Author Message
dmithunibm

New User


Joined: 23 May 2007
Posts: 19
Location: Bangalore

PostPosted: Tue Apr 22, 2008 11:31 am    Post subject: How to read a 'NULL' value from an IMS DB Segment
Reply with quote

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
View user's profile Send private message
References
PostPosted: Tue Apr 22, 2008 11:31 am    Post subject: Re: How to read a 'NULL' value from an IMS DB Segment Reply with quote

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 2443
Location: italy

PostPosted: Tue Apr 22, 2008 2:24 pm    Post subject: Reply to: How to read a 'NULL' value from an IMS DB Segment
Reply with quote

can You please elucubrate on the meaning of NULL
Back to top
View user's profile Send private message
dmithunibm

New User


Joined: 23 May 2007
Posts: 19
Location: Bangalore

PostPosted: Tue Apr 22, 2008 2:28 pm    Post subject: Reply to: How to read a 'NULL' value from an IMS DB Segment
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 2443
Location: italy

PostPosted: Tue Apr 22, 2008 2:32 pm    Post subject: Reply to: How to read a 'NULL' value from an IMS DB Segment
Reply with quote

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
View user's profile Send private message
dmithunibm

New User


Joined: 23 May 2007
Posts: 19
Location: Bangalore

PostPosted: Tue Apr 22, 2008 2:38 pm    Post subject: Reply to: How to read a 'NULL' value from an IMS DB Segment
Reply with quote

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
View user's profile Send private message
vasanthkumarhb

Senior Member


Joined: 06 Sep 2007
Posts: 303
Location: Bang,iflex

PostPosted: Tue Apr 22, 2008 2:42 pm    Post subject:
Reply with quote

Hi,


there is no NULL concept in IMS data base
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 2443
Location: italy

PostPosted: Tue Apr 22, 2008 2:45 pm    Post subject: Reply to: How to read a 'NULL' value from an IMS DB Segment
Reply with quote

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
View user's profile Send private message
dmithunibm

New User


Joined: 23 May 2007
Posts: 19
Location: Bangalore

PostPosted: Tue Apr 22, 2008 3:04 pm    Post subject: Reply to: How to read a 'NULL' value from an IMS DB Segment
Reply with quote

Hi Enrico,Vasanth,

Thanks a lot for your valuable info :-)


Thanks & Regards,
Mithun.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 177
Location: Deerfield IL

PostPosted: Tue Apr 22, 2008 8:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 6939
Location: 221 B Baker St

PostPosted: Tue Apr 22, 2008 8:56 pm    Post subject: Reply to: How to read a 'NULL' value from an IMS DB Segment
Reply with quote

Quote:
In some of our applications spaces in an otherwise numeric field is used to indicate "null"
And an occasional 0c7 for the unwary. . . icon_wink.gif
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1