View previous topic :: View next topic
|
Author |
Message |
Saroj Tripathy
New User
Joined: 05 Mar 2007 Posts: 23 Location: India
|
|
|
|
Please explain how to call a COBOL-DB2 pgm from a PL/1 pgm. I have been told that Fetchables can be used. can anybody explain the concept of Fetchables ?
Thanks,
Saroj |
|
Back to top |
|
|
hemachandran27
New User
Joined: 28 Feb 2007 Posts: 6 Location: chennai
|
|
|
|
We can't call the cobol-db2 program from pl1 program.since the
cobol-db2 program will have proc options(fetchable);
We can call only pl1-db2 program from pl/1 program.
Eg:
Fetch (cobol-pl1 programname);
Call(cobol-pl1 program name);
Release (cobol-pl/1 program name); |
|
Back to top |
|
|
hemachandran27
New User
Joined: 28 Feb 2007 Posts: 6 Location: chennai
|
|
|
|
Sorry,
cobol-db2 program doesn't have proc options(fetchable); |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
hi,
To answer your question i want to know is your PL/I program a BATCH programe or its a ONLINE program?...
And if it is a ONLINE program then what is your front end IMS-DC or CICS.
After getting this information i will be able to answer your question in a very precise manner |
|
Back to top |
|
|
Saroj Tripathy
New User
Joined: 05 Mar 2007 Posts: 23 Location: India
|
|
|
|
please consider two PL/1 programs.
1) First one is a online program with IMS-DC as front end.
2)Second is a batch program.
Please provide your answers. |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
in case of online program you can use CHNG call to tranfer your control from PL/I program to COBOL program.
this is done by defining ALTERNATE PCB in your already existing PSB
for eg.
CALL PLITDLI (FOUR,FUNCHNG,ALTPCB,DESTINATION_NAME)
In DESTINATION_NAME you specify the transaction code of online COBOL program. this call will transfer control from PL/I to COBOL.
the similar process can be used for tranfering control from batch PL/I program to ONLINE cobol pgm. |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
remember in PCB TYPE=TP , MODIFY=YES |
|
Back to top |
|
|
k_vikram07
New User
Joined: 23 Nov 2005 Posts: 35
|
|
|
|
If the COBOL-DB2 program exists as separate load, you can do a FETCH and then CALL and then RELEASE.
FETCH COBDB2;
CALL COBDB2;
RELEASE COBDB2;
Otherwise you can simply call as if it is a pl/1 subprogram.
CALL COBDB2;
ofcourse you may have to write the Entry declaration.
DCL COBDB2 EXT ENTRY;
Thanks
Vik. |
|
Back to top |
|
|
Suryanarayana.tadala
New User
Joined: 03 Nov 2005 Posts: 43 Location: St.Louis
|
|
|
|
The Concept of Fetchabel is that you would dynamilcally access the load and each application is breakup into small modules and all of these accessed thru an single program so as to get reduced load on the resources and also on the plan. I plan a fetchable then it would be associated with rest of all the programs that are in that fetchable.
You can call a fetchable within your PL/I program which is having your Cobol program.
But make sure that the fetchable copybook that you declare on both sides i mean thru PLI on the sender side and in COBOL (Recieving end should match else you would get a S0C7/S0C4.
This process is wisely used when you have PLI as one part of your application and Cobol on the other side of your application. |
|
Back to top |
|
|
|