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
 

 

DB2 UDB Stored Procedure "Select Into" with -811

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

New User


Joined: 20 Dec 2009
Posts: 2
Location: USA

PostPosted: Thu Jul 08, 2010 5:59 pm    Post subject: DB2 UDB Stored Procedure "Select Into" with -811
Reply with quote

Hi all,
I have a UDB Stored Procedure which has "Select into". It returns -811 and does not retrieve any rows into host variables.
Any suggestions why? (Besides cursor)

Thanks
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 08, 2010 6:04 pm    Post subject:
Reply with quote

because an -811 (in release vsn7 and above)
does not populate any host variables.
Back to top
View user's profile Send private message
Lenny2113

New User


Joined: 20 Dec 2009
Posts: 2
Location: USA

PostPosted: Thu Jul 08, 2010 8:20 pm    Post subject:
Reply with quote

Thank you! Will do cursor
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 08, 2010 8:23 pm    Post subject:
Reply with quote

glad we were able to help.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jul 09, 2010 12:09 am    Post subject:
Reply with quote

Sorry it took me so long to think of it,

but you can put a:
FETCH FIRST ROW ONLY
clause in the singleton select and you don't have to deal with cursors.
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 Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm


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