IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Using stored procedure in easytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
swathi41

New User


Joined: 09 Jun 2007
Posts: 3
Location: hyderabad

PostPosted: Thu Jul 05, 2007 2:15 pm
Reply with quote

I want to know how we can use stored procedures in Easytrieve.

swathi
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 05, 2007 8:14 pm
Reply with quote

Hello,

Please show some sample code where you want to use a "stored procedure".

When you have a new question, please start a new topic rather than posting a reply to an existing topic.
Back to top
View user's profile Send private message
swathi41

New User


Joined: 09 Jun 2007
Posts: 3
Location: hyderabad

PostPosted: Mon Jul 09, 2007 12:36 pm
Reply with quote

I want to know how we can use(the syntax) stored procedures in Easytrieve.

swathi
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 09, 2007 12:43 pm
Reply with quote

Hello,

You have just re-posted your original question with "(the syntax)" added in the middle.

This still does not explain what you are asking.

What are you calling a "stored procedure"? Most often a stored procedure is used with database processing. Is your question related to db2 or some other database system?

Once we understand your request, we may be able to make suggestions.
Back to top
View user's profile Send private message
swathi41

New User


Joined: 09 Jun 2007
Posts: 3
Location: hyderabad

PostPosted: Mon Jul 09, 2007 1:01 pm
Reply with quote

Hi,

These are the COBOL Procedure for recieving values from SP:
*****************************************************
A stored procedure can return results sets back to your COBOL program by leaving the cursor open. The open cursor can then be accessed in the COBOL program after the stored procedure has been executed. At a high level, there are seven basic steps for receiving result sets:
1) Declare a locator variable for each result set that will be returned.
2) Call the stored procedure and check the SQL return code. If the SQLCODE from the CALL statement is +466, the stored procedure has returned result sets.
3) Determine how many result sets the stored procedure is returning. Use the SQL statement DESCRIBE PROCEDURE to determine the number of result sets. DESCRIBE PROCEDURE places information about the result sets in an SQLDA.
4) Link result set locators to result sets. You can use the SQL statement ASSOCIATE LOCATORS to link result set locators to result sets. The ASSOCIATE LOCATORS statement assigns values to the result set locator variables. If you specify more locators than the number of result sets returned, DB2 ignores the extra locators.
5) Allocate cursors for fetching rows from the result sets. Use the SQL statement ALLOCATE CURSOR to link each result set with a cursor. Execute one ALLOCATE CURSOR statement for each result set. The cursor names can be different from the cursor names in the stored procedure.
6) Determine the contents of the result sets. Use the SQL statement DESCRIBE CURSOR to determine the format of a result set and put this information in an SQLDA. For each result set, you need an SQLDA big enough to hold descriptions of all columns in the result set.
7) Fetch rows from the result sets into host variables by using the cursors that you allocated with the ALLOCATE CURSOR statements. Fetching rows from a result set is the same as fetching rows from a table.


In a Simliar way how can we use the locator in the Ezt plus and the wht is the syntax for the Stored procedure.


Thanks,
Swathi.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Count the number of characters in a f... CA Products 1
No new posts Invoke stored procedure via batch JCL. DB2 2
No new posts File matching functionality in Easytr... DFSORT/ICETOOL 14
No new posts Calling COBOL DB2 program from a COBO... COBOL Programming 2
No new posts Cond parameter and Rc code of a proce... JCL & VSAM 5
Search our Forums:

Back to Top