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

Database access from COBOL


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
amitmahalkar

New User


Joined: 03 Feb 2006
Posts: 8

PostPosted: Wed Jan 27, 2016 11:33 am
Reply with quote

Hello All,

I have a question related to COBOL DB2 program in two different application.
I have a COBOL program (PGM-A) which belongs to Application-1. This program requires some data from Application-2. PGM-A calls to PGM-B (COBOL module). PGM-B calls to PGM-C(COBOL + DB2 module). PGM-B and PGM-C belongs to Application-2.
PGM-C gets the data from application-2 database(DB2) and pass it back to PGM-B and PGM-B then forwards it to PGM-A.
Question:
1. When PGM-A doesnt have authority to access Application-2 database, how its gets the data.
2. How can we restrict PGM-A accessing data from Application-2.
3. When PGM-A is being invoked from JCL, do we need to pass IKJEFTO1 inputs (program, plan) etc or it can be invoked directly by PGM=PGM-A
Back to top
View user's profile Send private message
Jiri Vandas

New User


Joined: 18 Aug 2014
Posts: 1
Location: Czech Republic

PostPosted: Wed Jan 27, 2016 8:37 pm
Reply with quote

Quote:
3. When PGM-A is being invoked from JCL, do we need to pass IKJEFTO1 inputs (program, plan) etc or it can be invoked directly by PGM=PGM-A


It can be invoked directly, but still you'll need to know destination DB2 system and plan name.

Please check Connecting to DB2 from your application program in DB2 doc
www-01.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/com.ibm.db2z11.doc.apsg/src/tpc/db2z_connectapplication.html?lang=en
chapter Call attachment facility (CAF)

Basically you need to add into PGM-A commands CONNECT ssid and OPEN plan calls. Also don't forget CLOSE and DISCONNECT icon_smile.gif The way how you pass these parameters (ssid/plan) to your application is up to you.
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 COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts How to access web services/website? Mainframe Interview Questions 4
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top