View previous topic :: View next topic
|
Author |
Message |
satya123 Warnings : 1 New User
Joined: 18 Aug 2006 Posts: 57
|
|
|
|
can anybody just explain me how to call a cobol-db2 program from a cobol-db2 program with sample coding. |
|
Back to top |
|
|
senman
New User
Joined: 17 Aug 2006 Posts: 17 Location: Chennai
|
|
|
|
As of my knowledge.... its usual as other normal calls to COBOL NonBB2 programs.
Call PGMNAME USING PARMLIST
If your case is different could you please elaborate on your query. |
|
Back to top |
|
|
satya123 Warnings : 1 New User
Joined: 18 Aug 2006 Posts: 57
|
|
|
|
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 *
DSN SYSTEM(DSN1)
RUN PROGRAM(INSERT1) PLAN(FAC003) -
LIB('FAC003.WIPRO.LOADLIB')
do i need to write anything else?
Regards
satya123 |
|
Back to top |
|
|
satya123 Warnings : 1 New User
Joined: 18 Aug 2006 Posts: 57
|
|
|
|
Please let me know can i call a cobol db2 program from a pure cobol program??? Then just send the process to follow( runjcl). |
|
Back to top |
|
|
phetu
New User
Joined: 19 Aug 2006 Posts: 13 Location: Canada
|
|
|
|
Have you try putting the subprogram's name between quotes:
CALL "SUBPROGRAM" USING ....
Patrick |
|
Back to top |
|
|
satya123 Warnings : 1 New User
Joined: 18 Aug 2006 Posts: 57
|
|
|
|
THANX PATRIC IT IS WORKING NOW.
PLEASE DO REPLY THE SECOND QUESTION ....hOW TO CALL COBOL-DB2 PROGRAM FROM A COBOL PROGRAM..WHAT WILL BE THE RUNJCL? |
|
Back to top |
|
|
phetu
New User
Joined: 19 Aug 2006 Posts: 13 Location: Canada
|
|
|
|
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.
Patrick |
|
Back to top |
|
|
satya123 Warnings : 1 New User
Joined: 18 Aug 2006 Posts: 57
|
|
|
|
Dear Patrick,
Thanx for the reply. But can u bit precise of explaining the Process?
1.I precompiled,bind the sub program which is having sql in it.
2.Do i need to go for precompile ???? or compile ??? the main program which does not have any sql in it
3. what jcl to be used for running the main program i.e db2run jcl ??? or cobol run jcl???
Please answer these... Thanx in advance..
satya123 |
|
Back to top |
|
|
crrindia
Active User
Joined: 02 Jul 2005 Posts: 124 Location: Gurgaon
|
|
|
|
Hi Patrick, can you pleaseprovide answers for his queries. B'cos I also have same kind of problem. Please help us to know about it.
Thanks!
RAthna. |
|
Back to top |
|
|
satya123 Warnings : 1 New User
Joined: 18 Aug 2006 Posts: 57
|
|
|
|
Hi Rathna,
Have u tried with cobol-db2 program calling cobol-db2 program?? Can u just send me a sample program and the processing of program??? |
|
Back to top |
|
|
phetu
New User
Joined: 19 Aug 2006 Posts: 13 Location: Canada
|
|
|
|
HI Satya,
You have to:
1) Precompile +compile (DB2) you sub program
2) Bind your subprogram (BIND PLAN OU BIND PACKAGE)
3) Compile your cobol main program
4) Run the main program with the DB2RUN JCL
In general, you would do the exact same action than if you would have a DB2 program calling an DB2 subprogram except that you don't precompile and bind your main program because there is no SQL in it.
Is that clear enougth?
Best regards
Patrick |
|
Back to top |
|
|
satya123 Warnings : 1 New User
Joined: 18 Aug 2006 Posts: 57
|
|
|
|
Hi Patric,
Really it works and thanks a lot.
Please do tell me the process of calling a cobol-db2 program to cobol-db2 program. I need the run jcl.
please explain the process.
satya123 |
|
Back to top |
|
|
phetu
New User
Joined: 19 Aug 2006 Posts: 13 Location: Canada
|
|
|
|
HI Satya,
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
Patrick |
|
Back to top |
|
|
satya123 Warnings : 1 New User
Joined: 18 Aug 2006 Posts: 57
|
|
|
|
Hi Patric,
Thanx a lot for the reply....Really it is working fine.
I have one more doubt can we have ISAM file in mainframe??? If yes then how to create it/???????
Thanks
satya123 |
|
Back to top |
|
|
|