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
 

 

DB2 Stored Procedure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
avinash pandey

New User


Joined: 10 Apr 2008
Posts: 17
Location: Bangalore

PostPosted: Mon Jun 22, 2009 1:48 pm    Post subject: DB2 Stored Procedure
Reply with quote

I am writting Employee Maintenance System application which has several online modules(CICS+DB2+COBOL), i have asked to use the stored procedure for fetching the record using cursor, i am newbie to the stored procedure, i know how to use the cursor and run the query fetch record one bye one, i am not understanding when and where i would be using the stored procedure for the application. Though i have successfully created a stored procedure, but i don't know how to use it.

I have created below procedure using SPUFI

CREATE PROCEDURE EMS2
(
IN USERID CHAR(8)
,OUT PASSWORD CHAR(8)
,
)
RESULT SETS 0
EXTERNAL NAME EMS2
LANGUAGE COBOL
PARAMETER STYLE GENERAL
MODIFIES SQL DATA
NO DBINFO
WLM ENVIRONMENT DB8GE
STAY RESIDENT NO
COMMIT ON RETURN NO ;


Do i require now to create its DCLGEN and then write its subprogram, please guide me how to move ahead, since i am not able to move forward, let me know the procedure

Please don't tell me go the Redboooks

I want to know step by step, what i need to do after creation of procedure.


Thanks for all help
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Mon Jun 22, 2009 2:03 pm    Post subject:
Reply with quote

Quote:
Please don't tell me go the Redboooks


Why not?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Mon Jun 22, 2009 2:14 pm    Post subject:
Reply with quote

Sorry,
here is the exact link to DB2 for z/OS SPs: Through the CALL and Beyond
and in case you are using DB2 9,
DB2 Vsn 9 for z/OS SPs: Through the CALL and Beyond
Back to top
View user's profile Send private message
avinash pandey

New User


Joined: 10 Apr 2008
Posts: 17
Location: Bangalore

PostPosted: Mon Jun 22, 2009 2:53 pm    Post subject: Reply to: DB2 Stored Procedure
Reply with quote

I have gone through, it but i need to know the procedure

1) Creation of SP
2) Creation of DCLGEN
3) Creation of Subprogram
4) Compilation using precompiler


Let me know , I have gone through redbooks but i require the additional info on it
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Mon Jun 22, 2009 3:01 pm    Post subject:
Reply with quote

at some point you are going to have to talk to your db2 support personnel and
become aquainted with your site-standards.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Jun 22, 2009 3:31 pm    Post subject:
Reply with quote

You are stuck in site specific things -- how these things work at my end may not work for you.

1. What version control tool do you use? If change man, I may be of some help.

2. Do you have DATABASE 2 Interactive (DB2I) available?

3. ah..aa what probelm are you facing from sub-program per se?

4. 'gain, What version control tool do you use?
Back to top
View user's profile Send private message
avinash pandey

New User


Joined: 10 Apr 2008
Posts: 17
Location: Bangalore

PostPosted: Mon Jun 22, 2009 3:38 pm    Post subject: Reply to: DB2 Stored Procedure
Reply with quote

Yes i am using DB2 I database, i am not using changeman

I have created a stored procedure and i want to know what all things next to be done with start up the coding of SP?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Jun 22, 2009 3:58 pm    Post subject:
Reply with quote

DCLGEN can be generated using DB2I.

I echo Dick and repeat my self -- all the questions you are asking are site specific -- please refer some other SP at your shop.
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 6 Thu Oct 27, 2016 10:20 am


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