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
 

 

Stored Procedure accessing VSAM

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

New User


Joined: 04 Mar 2013
Posts: 16
Location: India

PostPosted: Wed Mar 18, 2015 6:14 pm    Post subject: Stored Procedure accessing VSAM
Reply with quote

Hi,

I want to access VSAM File in a Stored Procedure. It is completely new to me. I searched on net and gone through the manuals available on this site. Below is what my understanding.
1. I need to write External Stored Procedure in COBOL .
2. This prcedure should be registered with WLM Env and RACF Env.

Can somebody please provide sample code ? I have difficulty in understanding if I define VSAM file in Stored Procedure written in cobol how will it access exact VSAM File which I need to read. Like in JCL we provide DD Statement . How does it works here.

If you can provide sample code will be great help in understanding this.
Thank you .
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Thu Mar 19, 2015 3:55 am    Post subject:
Reply with quote

Hope these links would help you and if not then please let us know someone would answer more specifically.

http://ibmmainframes.com/about53662.html
http://ibmmainframes.com/about46201.html
Back to top
View user's profile Send private message
yogesh suryawanshi

New User


Joined: 04 Mar 2013
Posts: 16
Location: India

PostPosted: Thu Mar 19, 2015 8:51 pm    Post subject: Reply to: Stored Procedure accessing VSAM
Reply with quote

Rohit,

Thanks for sharing these links. I have already gone through these link before I post my query yesterday. I also gone through DB2 Manual and documents available on internet sources. But none of them has provided atleast pseudo code which shows how to define file in stored procedure.

I need more specific details or example which shows how a stored procedure is defined using WLM Parameter which has JCL DD Name.
Also want to know if it required a JCL Job to run in batch environment ?

Any help you can provide will be great help. Thank you.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Thu Mar 19, 2015 9:05 pm    Post subject:
Reply with quote

http://it.toolbox.com/blogs/db2zos/the-magic-triangle-stored-procedures-wlm-and-wlm-started-task-33433
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Thu Mar 19, 2015 9:12 pm    Post subject:
Reply with quote

Yogesh, Are you a DBA? if not then that is not you supposed to do , please redirect this to DBA's.


if you are accessing VSAM files you need a JCL DD statement in the stored procedures address space ,JCL procedure for every file that the stored procedure accesses.

check out more here...

http://www.redbooks.ibm.com/redbooks/pdfs/sg245485.pdf
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Fri Mar 20, 2015 12:13 am    Post subject:
Reply with quote

anyone one can write a cobol stored procedure, you only need the DBA to setup the access for the stored procedure.
Back to top
View user's profile Send private message
yogesh suryawanshi

New User


Joined: 04 Mar 2013
Posts: 16
Location: India

PostPosted: Fri Mar 20, 2015 8:51 am    Post subject: Reply to: Stored Procedure accessing VSAM
Reply with quote

Thanks for the information. It helped to understand. I am already discussing with DBA on this. And DBA said there is no way to make change in WLM Environment. So to talk to him again can you please tell me what steps that has to be followed to get this done. Is it like :
1. Write Stored Procedure in COBOL which access the file (DD name etc)
2. Ask DBA to set up WLM Environment for the Stored Procedures
3. Get Stored Procedure registered in DB2.

Please let m eknow what steps to be followed.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Tue Mar 24, 2015 2:47 am    Post subject:
Reply with quote

Add a DD name of the file (WLM job) that is being referenced in SP.
Back to top
View user's profile Send private message
yogesh suryawanshi

New User


Joined: 04 Mar 2013
Posts: 16
Location: India

PostPosted: Tue Mar 24, 2015 9:28 am    Post subject: Reply to: Stored Procedure accessing VSAM
Reply with quote

Thanks Rohit for confirming !!!
On this particular topic there lot of links and documents available but none of them has specifically mentioned what has to be changed and where.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Wed Mar 25, 2015 2:53 am    Post subject:
Reply with quote

Welcome Yogesh and All the best!!
Usually, these are DBA's activity icon_biggrin.gif and please post us back the steps when you know.
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 BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 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 4 Thu Oct 27, 2016 10:20 am
No new posts VSAM define for large file jerryte JCL & VSAM 9 Wed Oct 05, 2016 1:51 am
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm


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