View previous topic :: View next topic
|
Author |
Message |
Anees Fatima
New User
Joined: 03 Apr 2015 Posts: 2 Location: Hyderabad
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
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 |
|
|
Anees Fatima
New User
Joined: 03 Apr 2015 Posts: 2 Location: Hyderabad
|
|
|
|
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. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3077 Location: NYC,USA
|
|
|
|
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 |
|
|
|