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 do you retrieve the data from a nullable column

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
sandy_mcs

New User


Joined: 01 Apr 2006
Posts: 17
Location: Pune

PostPosted: Mon Apr 17, 2006 7:10 pm    Post subject: How do you retrieve the data from a nullable column
Reply with quote

I know
we use null indicators. Syntax ... INTO: HOSTVAR: NULLIND
But what is to be specified in NULLIND
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Mon Apr 17, 2006 10:58 pm    Post subject: Re: How do you retrieve the data from a nullable column
Reply with quote

Hello Sandy,

the NULLIND is defined as a half word binary field: PIC S9(4) COMP.

The value populated in this field for nullable columns is 0= value is NOT NULL, -1= value is NULL. If the value is NULL, the value in HOSTVAR is unknown (usually low-values)

Dave
Back to top
View user's profile Send private message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Tue Apr 18, 2006 11:10 am    Post subject:
Reply with quote

Hello Sandy,

In a fetch operation you don't have to specify any thing in NULLIND, it just gets populated as Dave said.

If you're fetching a table with one(or more) of the fields declared as NOT NULL into a copybook, you'll need to modify the DCLGEN to have a null indicator variable in the copybook. Depending on the value of NULLIND, you should populate this indecator variable(with a question mark or something).

This's just one way of handling nulls, this's helpful in unloading tables into flat files and then used to load other tables(widely used in migration systems.)

Any questions, please let me know.

Cheers, Twissi.
Back to top
View user's profile Send private message
kotireddy

New User


Joined: 03 Apr 2006
Posts: 1

PostPosted: Tue Apr 18, 2006 1:40 pm    Post subject: Re: How do you retrieve the data from a nullable column
Reply with quote

we can retrieve data from a nullable column using ' Is null ' clause
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm


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