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

DB2 Stored Procedure


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 6966
Location: porcelain throne

PostPosted: Mon Jun 22, 2009 2:03 pm
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: 6966
Location: porcelain throne

PostPosted: Mon Jun 22, 2009 2:14 pm
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
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: 6966
Location: porcelain throne

PostPosted: Mon Jun 22, 2009 3:01 pm
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

Superior Member


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

PostPosted: Mon Jun 22, 2009 3:31 pm
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
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

Superior Member


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

PostPosted: Mon Jun 22, 2009 3:58 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Invoke stored procedure via batch JCL. DB2 2
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
This topic is locked: you cannot edit posts or make replies. Internal Autonomous Stored Procedure ... DB2 6
No new posts Stored procedure cpu utilization DB2 1
Search our Forums:

Back to Top