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

Static calling one db2 program gives plan error


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

New User


Joined: 31 Jan 2006
Posts: 49

PostPosted: Thu Jun 14, 2007 3:16 pm
Reply with quote

I am running one non db2 program, it is calling one db2 program, it is a static call. While running it is confusing with
plan and package. Let anyone tell me in run jcl which plan and which program name I have to give.
ie, //systsin dd *
dsn system(icon_cool.gif
run program(?) plan(?)

raj
Back to top
View user's profile Send private message
raghunathns

Active User


Joined: 08 Dec 2005
Posts: 127
Location: rochester

PostPosted: Fri Jul 06, 2007 10:33 pm
Reply with quote

create plan for your mainframe. Bind main program with calling program dbrm.
Back to top
View user's profile Send private message
Karthikshankar

New User


Joined: 29 Jun 2007
Posts: 2
Location: Pune

PostPosted: Thu Jul 12, 2007 4:08 pm
Reply with quote

The Main Module is calling the sub program (which is a COBOL-DB2 program) in static/dynamic mode the following steps should be followed for compilation.

If Main COBOL Program is calling the Sub program (COBOL-DB2) in a static mode,

1.Compile the sub program separately. Since it is a COBOL-DB2 progra, it has to go through all the steps of compilation i.e Pre-compilation, Bind, & compile/Link.


2. Compile the main program. Since it's a pure COBOL program, it can be compiled using a normal COBOL compiler. The compiler would expect the load module of the sub program (which would have been created after the completion of step mentioned above) and picks it from the appropriate load library.

If Main COBOL Program is calling the Sub program (COBOL-DB2) in a dynamic mode,

1. Compile the sub program separately as mentioned above. i.e treat the program as a normal COBOL-DB2 program and compile it using the COBOL-DB2 compiler.

2. Compile the main program. Since the call is dynamic, the compiler would not expect the load module of the subroutine and compiles only the main program.

Finally in the RUN JCL, the following statement should be specified.

RUN PROGRAM (MAIN PROGRAM NAME) PLAN (SUB PROGRAM NAME).

This is a simple PLAN Bind procedure.

Note : The above can be accomplished also through Package Bind. Instead of creating plan for the sub-program, create a package and bind it against the application plan.
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 Using API Gateway from CICS program CICS 0
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top