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: 2134
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: 2104
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 General Query on DB2 table design subratarec DB2 3 Thu Feb 14, 2019 12:49 pm
No new posts Fetch first first row in inner join! Vignesh Sid DB2 13 Tue Dec 04, 2018 7:25 pm
No new posts What is a table space in db2 for z/os? martin schlatter DB2 13 Sat Nov 24, 2018 11:19 pm
No new posts Modify the value of a extensionvariab... UmeySan CLIST & REXX 29 Wed Nov 14, 2018 11:48 pm
No new posts DB2 SQL Query to fetch all instances ... MallikarjunSM DB2 2 Thu Sep 27, 2018 6:46 pm

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