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
 

 

Accessing VSAM file thru Stored procedure written in COBOL

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

New User


Joined: 15 Apr 2008
Posts: 5
Location: Airoli

PostPosted: Thu Mar 03, 2011 12:17 pm    Post subject: Accessing VSAM file thru Stored procedure written in COBOL
Reply with quote

I am writing Stored procedure in COBOL. This will be called from webservice. I want to access VSAM file in stored procedure and pass data to webservice. Can anyoe please help if it is possible to access VSAM file in SP? If yes, please can you guide me thru this?
Back to top
View user's profile Send private message

GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Mar 03, 2011 1:58 pm    Post subject:
Reply with quote

I never did it but my guess :
Just like in any cobol program, just make sure the DD is in the JCL of the WLM-environment.
You would need to open and close the VSAM each call to the SP, there would be RACF authorization stuff to handle, ...
It just might be easier to convert it to a DB2 table

sg247604 - Stored Procedure Through the CALL and beyond wrote:
For example, you may have a CICS application that accesses data from a VSAM file. If you
are developing DB2 applications that need to access data from that VSAM file, and you do not
have the resources to migrate that data from VSAM to DB2 at this time, you can access the
VSAM file from a DB2 stored procedure using the external CICS interface or DB2-supplied
stored procedure DSNACICS to execute an existing CICS program. You can also access the
VSAM file from within your stored procedure, but that would require you to define a DD
statement for that file within your application environment. Then, if you alter the stored
procedure to execute in a different environment, you need to change the JCL for the old and
new environments.
Back to top
View user's profile Send private message
pratham

New User


Joined: 15 Apr 2008
Posts: 5
Location: Airoli

PostPosted: Thu Mar 03, 2011 2:16 pm    Post subject: Reply to: Accessing VSAM file thru Stored procedure written
Reply with quote

Thanks a lot. I am new to Stored Procedure. Can you please provide me with any study material or any link where i can follow steps to do as you mentioned? It will really help.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Mar 03, 2011 3:06 pm    Post subject:
Reply with quote

Typical example of first picking the tool and then do any job with it.

You don't pick a hammer because you ever borrowed a hammer to put a nail in and then ask how to use a hammer for putting in a screw.
Maybe you should use a screwdriver? In this case cics transaction gateway or something.

If you can't find study material by yourself, you shouldn't be in IT.

(Does it show I'm in a bad mood today ?)
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Thu Mar 03, 2011 3:14 pm    Post subject: Reply to: Accessing VSAM file thru Stored procedure written
Reply with quote

expressing proper concepts is not a symptom of bad mood...
just of good judgement icon_biggrin.gif

looking and searching for documentation is something pretty unknown around here!
Back to top
View user's profile Send private message
pratham

New User


Joined: 15 Apr 2008
Posts: 5
Location: Airoli

PostPosted: Thu Mar 03, 2011 3:16 pm    Post subject: Reply to: Accessing VSAM file thru Stored procedure written
Reply with quote

Thanks a lot for your valuable information.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Mar 03, 2011 5:27 pm    Post subject:
Reply with quote

Pratham,

In google type this without quotes"Accessing non-DB2 resources in your stored procedure"

Regards,
Sushanth
Back to top
View user's profile Send private message
pratham

New User


Joined: 15 Apr 2008
Posts: 5
Location: Airoli

PostPosted: Fri Mar 04, 2011 10:09 am    Post subject:
Reply with quote

Hi,
I have got solution and related documents. Thanks to all of you.
Back to top
View user's profile Send private message
shivaganeshaa

New User


Joined: 11 Aug 2005
Posts: 14
Location: chennai

PostPosted: Fri Mar 23, 2012 3:08 am    Post subject:
Reply with quote

sushanth bobby

Inofrmation you provided was helpful
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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