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

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.

While calling from JCL we usually write as below

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: 2578
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 Any examples of calling FTP from REXX? CLIST & REXX 1
This topic is locked: you cannot edit posts or make replies. Passing a field name to COBOL program COBOL Programming 10
No new posts COBOL Performance Tuning COBOL Programming 6
No new posts JCL for replacing code in Cobol JCL & VSAM 7
No new posts Calling Assembler from REXX PL/I & Assembler 5
Search our Forums:

Back to Top