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
 

 

Declaration of null indicator in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Naga Rajender.K

New User


Joined: 19 Dec 2008
Posts: 13
Location: Hyderabad

PostPosted: Thu Jan 22, 2009 11:12 am    Post subject: Declaration of null indicator in COBOL
Reply with quote

Hi,

I want to delete rows using cursors.I have declared null indicators to two columns which has nulls in 1 row.

I declared as
EXEC SQL BEGIN DECLARE END-EXEC.
01 S-NULL-INDICATORS.
05 S-LNAME-NULL-IND PIC S9(04).
05 S-CITY -NULL-IND PIC S9(04).
EXEC SQL END DECLARE END-EXEC.

I am getting 00000030N while fetching that row.
Pls help me out.
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: Thu Jan 22, 2009 11:38 am    Post subject:
Reply with quote

Hello and welcome to the forum,

Quote:
I am getting 00000030N while fetching that row.
This is a -305
Quote:
-305 THE NULL VALUE CANNOT BE ASSIGNED TO OUTPUT HOST VARIABLE NUMBER
position-number BECAUSE NO INDICATOR VARIABLE IS SPECIFIED

This is a similar, previous topic:
http://ibmmainframes.com/viewtopic.php?t=20346
Suggest you read thru the entire topic.

The declare posted appears incomplete. This link if to part of the DB2 SQL Reference (available via the "IBM Manuals" link at the top of the page.
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dsnsqj10/2.17.1?
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Thu Jan 22, 2009 11:40 am    Post subject:
Reply with quote

Rajendar,
Hope you are using these NULL indicators properly in the FETCH statement.
Back to top
View user's profile Send private message
Naga Rajender.K

New User


Joined: 19 Dec 2008
Posts: 13
Location: Hyderabad

PostPosted: Thu Jan 22, 2009 11:52 am    Post subject: Thanks
Reply with quote

Hi,

Thanks 4 ur reply. I got it.

regards
Naga
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
No new posts COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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