IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to read a 'NULL' value from an IMS DB Segment


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dmithunibm

New User


Joined: 23 May 2007
Posts: 18
Location: Bangalore

PostPosted: Tue Apr 22, 2008 11:31 am
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
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Apr 22, 2008 2:24 pm
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: 18
Location: Bangalore

PostPosted: Tue Apr 22, 2008 2:28 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Apr 22, 2008 2:32 pm
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: 18
Location: Bangalore

PostPosted: Tue Apr 22, 2008 2:38 pm
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

Active User


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

PostPosted: Tue Apr 22, 2008 2:42 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Apr 22, 2008 2:45 pm
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: 18
Location: Bangalore

PostPosted: Tue Apr 22, 2008 3:04 pm
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: 305
Location: Deerfield IL

PostPosted: Tue Apr 22, 2008 8:48 pm
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Apr 22, 2008 8:56 pm
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts ICETOOL to Read records SMF CEF it is... DFSORT/ICETOOL 4
Search our Forums:

Back to Top