Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10327
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: 10327
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: 10327
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 how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us