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

Cursor declaration in linkage section


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

New User


Joined: 26 Jun 2006
Posts: 4

PostPosted: Thu Mar 19, 2009 11:05 am
Reply with quote

HI,
we are developing stored proc in cobol. We are having cursor declaration in linakge section.This is working fine,when alphanumeric is passed from calling program to declare cursor,and the same is not working if the variable used is comp data type.

The calling program here is java nad it sends an integer.


LINKAGE SECTION.
01 I-HH-NUM PIC S9(9) USAGE COMP.
EJECT
EXEC SQL
DECLARE HH_CLAIMS_CURSR CURSOR WITH RETURN FOR
SELECT *
FROM ASOI
WHERE
SOI_ID = :I-HH-NUM
WITH UR END-EXEC.


CREATE PROCEDURE SMEEEMP(I_HH_NUM INTEGER IN)
DYNAMIC RESULT SET 01
LANGUAGE COBOL
NOT DETERMINISTIC
EXTERNAL NAME "SMEEEMP"

Any suggestion?
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 Mar 19, 2009 7:49 pm
Reply with quote

Hello,

Try sending the number as alpha text rather than "comp".
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 COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts FD Section to Create FB or Vb File Dy... COBOL Programming 1
No new posts OPTLINK linkage convention PL/I & Assembler 3
No new posts Sections: need one appearance of cer... DFSORT/ICETOOL 4
Search our Forums:

Back to Top