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
 

 

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: 1712
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: 1609
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 Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am
No new posts Updating online Db2 table kishpra DB2 3 Fri Aug 12, 2016 2:44 pm
No new posts JCL to fetch schedule status from act... parasmalik20 CA Products 1 Thu Jun 02, 2016 7:11 pm


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