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- rowset positioning cursor issue

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

New User


Joined: 08 Aug 2008
Posts: 9
Location: Kolkata

PostPosted: Mon Mar 16, 2009 2:16 pm    Post subject: DB2- rowset positioning cursor issue
Reply with quote

We have defined a rowset cursor and trying to fetch the rowset cursor, but facing issue in pre-compile.

Code:

Declaration:

DECLARE CURSOR3 CURSOR

WITH ROWSET POSITIONING

FOR

SELECT a, b, c, d

FROM TableA

WHERE Z = 'MKT'

AND STAT = 'ACTIVE'

AND T_EFF_X ¬> :WS-CURRENT-TS

AND (T_END_X ¬< :WS-CURRENT-TS

OR T_END_X IS NULL)

END-EXEC.

Fetch:
EXEC SQL

FETCH ROWSET FROM CURSOR3

FOR 1000 ROWS

INTO :WS1-A ,

:WS1-B ,

:WS1-C ,

:WS1-D


END-EXEC

Error:

DB2 SQL PRECOMPILER MESSAGES
DSNH104I E DSNHSM3 LINE 8320 COL 33 ILLEGAL SYMBOL "FROM". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: STARTING
DSNH104I E DSNHSM3 LINE 8320 COL 38 ILLEGAL SYMBOL "CURSOR3".SOME SYMBOLS THAT MIGHT BE LEGAL ARE: AT

Please let me know if you know what the issue may be. I don't want to make this a scrollable cursor. I just want to do multi-fetch.
Back to top
View user's profile Send private message

Succor

New User


Joined: 20 Feb 2009
Posts: 96
Location: Bangalore :)

PostPosted: Mon Mar 16, 2009 3:12 pm    Post subject: Reply to: DB2- rowset positioning cursor issue
Reply with quote

Santsark,Try
Code:
FETCH NEXT ROWSET FROM CURSOR3
inplace of
Code:
FETCH ROWSET FROM CURSOR3


WTF
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 Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts Updating Cursor row withour using FOR... chandan.inst DB2 15 Tue Nov 08, 2016 11:17 am
No new posts DFHRESPONSE returns issue divated CICS 3 Wed Nov 02, 2016 6:32 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am


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