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
 

 

Static calling one db2 program gives plan error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Static calling one db2 program gives plan error
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    Post subject: Static calling one db2 program gives plan error
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    Post subject: Non-DB2 Module Calling a DB2 Module
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    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 Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am
No new posts Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm


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