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

Multiple COBOL-DB2 pragrams calling by different plan


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

New User


Joined: 05 Jan 2016
Posts: 8
Location: India

PostPosted: Wed Jan 06, 2016 3:45 pm
Reply with quote

Hi All,

I have one scenario, it will be great if some one advice and answer.

I have below 4 programs
PROG1(COBOL Program).
PROG2(COBOL-DB2 Program) uses DB2 Plan ABC123.
PROG3(COBOL Program).
PROG4(COBOL-DB2 Program) uses DB2 Plan XYX456.

If PROG1 call PROG2 and PROG2 call PROG3 and PROG3 call PROG4.
(PROG01->PROG02->PROG03->PROG04)

While calling from JCL we usually write as below
//BLASTP00 EXEC PGM=IKJEFT01,REGION=6M,TIME=60,
// PARM=('%DB2EXECE SY(DB2C) PL(ABC123) PR(PORG1)')

But How to pass Plan name for PROG4 ?
How PROG02 will get plan name from base program PORG1 ?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Wed Apr 20, 2016 8:26 pm
Reply with quote

I hope by now you got it working and understand how it works but to answer the post, each program (or subprogram) that contains SQL needs to be pre-processed to create a DBRM. The DBRM is then bound into a PLAN that is accessed by a LOAD module at run time to obtain the correct DB/2 access paths for the SQL statements it contains.

The basic process remains the same - you need a PLAN to run the program and check PLANs + COLLECTIONs + VERSIONs + PACKAGEs + DBRMs = Confusion to avoid anymore confusion.
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
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 Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top