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

Using Rowset fetch on Remote Table


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anees Fatima

New User


Joined: 03 Apr 2015
Posts: 2
Location: Hyderabad

PostPosted: Fri Apr 03, 2015 10:33 am
Reply with quote

Hi All,

I am trying to used Multi rowset fetch on a view which is being created on tables those do not exist on Mainframes, we are able access only view.
I have followed below procedure for declaring and accessing cursor -

Please check the attachment, Your suggestions would be appreaciated.

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

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Apr 03, 2015 11:05 pm
Reply with quote

a) there is no attachment
b) you should not use attachments as some people a) do not open them in case of viruses or b) are not allowed to openn them (company policy) or c) cannot be bothered with things that make reading, and thus answering, a topic more difficult than it need be.
Back to top
View user's profile Send private message
Anees Fatima

New User


Joined: 03 Apr 2015
Posts: 2
Location: Hyderabad

PostPosted: Mon Apr 06, 2015 11:46 am
Reply with quote

Thanks Nic,

We were trying to access LUW(Linux,UNIX,Windows) tables and were implenting ROWSET on the same while we access them in Mainframes. But we later found out that rowset is not supported on LUW tables. icon_smile.gif
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Mon Apr 06, 2015 8:40 pm
Reply with quote

Why Don't LUW tables place the data into temp table and then place a cursor over it, did you try that?

And also make sure you use something like below to get the data,


Code:
1. Define in WS
 
01 LOC1 USAGE SQL TYPE IS
 RESULT-SET-LOCATOR VARYING.
 
2. In procedure
 
CALL SP
 
EVALAUTE SQL call from CALL
 EVALAUTE RETURN CODE fro SP
 
IF no errors execute next :
 
EXEC SQL
 ASSOCIATE RESULT SET LOCATOR (:LOC1)
 WITH PROCEDURE SP
 END-EXEC.
 EVALUATE SQL code
 
If no errors
 EXEC SQL
 ALLOCATE C1 CURSOR FOR RESULT SET :LOC1
 END-EXEC.
 EVALUATE Sql CODE
 If no errors
 FETCH DATA
 
END-IF
 END-IF
 END-IF
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top