Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
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    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

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
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: 18
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: 10231
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: 18
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

Active User


Joined: 06 Sep 2007
Posts: 276
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: 10231
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: 18
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: 305
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

Site Director


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

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us