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
 

 

Database access from COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Database access from COBOL
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    Post subject:
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
http://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    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 IMS DC screen Access sivasaras IMS DB/DC 3 Fri Nov 18, 2016 6:38 pm
No new posts IMS Database backup info ashek15 IMS DB/DC 14 Wed Nov 16, 2016 5:29 am
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am


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