View previous topic :: View next topic
|
Author |
Message |
yogesh suryawanshi
New User
Joined: 04 Mar 2013 Posts: 16 Location: India
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
Back to top |
|
|
yogesh suryawanshi
New User
Joined: 04 Mar 2013 Posts: 16 Location: India
|
|
|
|
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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
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...
www.redbooks.ibm.com/redbooks/pdfs/sg245485.pdf |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
anyone one can write a cobol stored procedure, you only need the DBA to setup the access for the stored procedure. |
|
Back to top |
|
|
yogesh suryawanshi
New User
Joined: 04 Mar 2013 Posts: 16 Location: India
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
Add a DD name of the file (WLM job) that is being referenced in SP. |
|
Back to top |
|
|
yogesh suryawanshi
New User
Joined: 04 Mar 2013 Posts: 16 Location: India
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
Welcome Yogesh and All the best!!
Usually, these are DBA's activity and please post us back the steps when you know. |
|
Back to top |
|
|
|