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: 2012
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: 1896
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 Extracting DDL for all list of intere... Ashishpanpaliya DB2 5 Mon May 21, 2018 4:08 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm
No new posts COBOL declaration for table Poha Eater DB2 3 Mon Feb 26, 2018 6:58 pm
No new posts Logic to skip Maximum time-stamp and ... vickey_dw DB2 2 Thu Feb 01, 2018 11:15 pm

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