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 stored procedure in easytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Using stored procedure in easytrieve
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

Site Director


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

PostPosted: Thu Jul 05, 2007 8:14 pm    Post subject:
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    Post subject: How to use Stored Procedures in Easytrieve
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

Site Director


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

PostPosted: Mon Jul 09, 2007 12:43 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Easytrieve report shalem CA Products 4 Sun Feb 26, 2017 9:08 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm


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