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

What is Null indicator?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vbhat

New User


Joined: 29 Apr 2005
Posts: 38

PostPosted: Thu May 05, 2005 9:56 am
Reply with quote

What is Null indicator?

please explain me

thanks
vbhat
Back to top
View user's profile Send private message
ovreddy

Active User


Joined: 06 Dec 2004
Posts: 211
Location: Keane Inc., Minneapolis USA.

PostPosted: Thu May 05, 2005 4:49 pm
Reply with quote

Hi Bhat,

-305 THE NULL VALUE CANNOT BE ASSIGNED TO OUTPUT HOST VARIABLE. NO INDICATOR VARIABLE IS SPECIFIED

A FETCH, SELECT, VALUES INTO, or SET assignment statement
resulted in the retrieval of a null value to be inserted into the output
host variable. An indicator variable must be supplied if a column returns a null value.

Examine the definition of the table and correct the application program to provide indicator variables for all host variables into which null values can be retrieved. This includes host variables for columns which can contain null values and host variables which receive the results of aggregate functions whose result table could be empty.

Eg: SELECT EMPNO,ENAME,COMM INTO :HV-EMPNO,:HV-ENAME,:HV-COMM:HV-COMMIND FROM EMP WHERE EMPNO=1001;

The host variable :HV-COMMIND is Null indicator. We need to declare it in Working storage section as S9(4).

:HV-COMMIND = -1 means COMM is NULL.

Thanks,
Reddy.
Back to top
View user's profile Send private message
vbhat

New User


Joined: 29 Apr 2005
Posts: 38

PostPosted: Fri May 06, 2005 10:12 am
Reply with quote

thanks readdy
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Adding 'ODD' and 'EVEN' indicator at ... DFSORT/ICETOOL 6
No new posts Cobol prog to put an indicator on the... JCL & VSAM 1
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
No new posts Uploading from desktop, a CSV file, s... DB2 2
Search our Forums:

Back to Top