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

PL/1 program calling a COBOL-DB2 program.


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Saroj Tripathy

New User


Joined: 05 Mar 2007
Posts: 23
Location: India

PostPosted: Fri Mar 09, 2007 10:53 am
Reply with quote

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
View user's profile Send private message
hemachandran27

New User


Joined: 28 Feb 2007
Posts: 6
Location: chennai

PostPosted: Mon Mar 12, 2007 6:25 pm
Reply with quote

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
View user's profile Send private message
hemachandran27

New User


Joined: 28 Feb 2007
Posts: 6
Location: chennai

PostPosted: Mon Mar 12, 2007 6:30 pm
Reply with quote

Sorry,
cobol-db2 program doesn't have proc options(fetchable);
Back to top
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Mon Mar 19, 2007 7:40 pm
Reply with quote

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
View user's profile Send private message
Saroj Tripathy

New User


Joined: 05 Mar 2007
Posts: 23
Location: India

PostPosted: Tue Mar 20, 2007 3:49 pm
Reply with quote

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
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Wed Mar 28, 2007 6:01 pm
Reply with quote

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
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Wed Mar 28, 2007 6:05 pm
Reply with quote

remember in PCB TYPE=TP , MODIFY=YES
Back to top
View user's profile Send private message
k_vikram07

New User


Joined: 23 Nov 2005
Posts: 35

PostPosted: Wed May 30, 2007 6:10 pm
Reply with quote

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
View user's profile Send private message
Suryanarayana.tadala

New User


Joined: 03 Nov 2005
Posts: 43
Location: St.Louis

PostPosted: Sat Jun 23, 2007 1:34 am
Reply with quote

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
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top