Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
PL/1 program calling a COBOL-DB2 program.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: PL/1 program calling a COBOL-DB2 program.
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    Post subject:
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    Post subject:
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: 195
Location: india

PostPosted: Mon Mar 19, 2007 7:40 pm    Post subject: Re: PL/1 program calling a COBOL-DB2 program.
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    Post subject: Re: PL/1 program calling a COBOL-DB2 program.
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: 195
Location: india

PostPosted: Wed Mar 28, 2007 6:01 pm    Post subject: Re: PL/1 program calling a COBOL-DB2 program.
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: 195
Location: india

PostPosted: Wed Mar 28, 2007 6:05 pm    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us