Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6968
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: 6968
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: 6968
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 Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us