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
 
Using Rowset fetch on Remote Table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Using Rowset fetch on Remote Table
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: 1895
Location: UK

PostPosted: Fri Apr 03, 2015 11:05 pm    Post subject:
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    Post subject: Using Rowset fetch on Remote Table
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

Senior Member


Joined: 21 Sep 2010
Posts: 1805
Location: NY,USA

PostPosted: Mon Apr 06, 2015 8:40 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm

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