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

Declaration of null indicator in COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Thu Jan 22, 2009 11:38 am
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:
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.
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top