Thanks senman for ur promt reply.
My problem is i get sub program load module not found while running my main program.
Please correct me if i am wrong
1. i compiled sub program & maxcc=0
2. compiled the main also & maxcc=0
3. Bind the sub program & maxcc=0
4.Bind the main program & maxcc=0
5.Then i am running the main program
it is saying subprogram load module is not found. But i checked my Load module pds both r there.
Please check my main program run jcl and correct it.
//SYSTSIN DD *
RUN PROGRAM(INSERT1) PLAN(FAC003) -
The JCl will be the same as if you were calling a DB2 program from another DB2 program. The only exception is that you won't have to bind the main program because you don't have any SQL statement in it. But the JCL statement will be the same.
You have to:
1) Precompile +compile (DB2) you sub program
2) Precompile +compile (DB2) you main program
3) BIND PLAN (the pklist should contains both the main and the sub program DBRM (same name thant the source))
4) Run the main program with the DB2RUN JCL