Cobol calling Pl/1 program 
Author Message
 Cobol calling Pl/1 program

Guru,

    I have a cobol program which has to call PL/1 program with some passing
parms. When I tested
Before calling PL/1 program Cobol displays the correct values. But the PL/1
Programs Not taking it    and always shows blanks, finally PL/1 abends
because of No values being passed.

My question  is there anything special I have to pass.

Example:

    C1 is cobol program

    P1 PL/1 program

In cobol

    Call Pl using Address by (d2 )

Where has d2 is character field in both programs.

Help me please.




Tue, 23 Sep 2003 09:28:20 GMT  
 Cobol calling Pl/1 program
You only gave half of the equation.

What have you coded in the PL/I program?

Quote:

> Guru,

>     I have a cobol program which has to call PL/1 program with some passing
> parms. When I tested
> Before calling PL/1 program Cobol displays the correct values. But the PL/1
> Programs Not taking it    and always shows blanks, finally PL/1 abends
> because of No values being passed.

> My question  is there anything special I have to pass.

> Example:

>     C1 is cobol program

>     P1 PL/1 program

> In cobol

>     Call Pl using Address by (d2 )

> Where has d2 is character field in both programs.

> Help me please.





Tue, 23 Sep 2003 19:33:32 GMT  
 Cobol calling Pl/1 program
SankarRavi writes ..

Guru,

Quote:
>  I have a cobol program which has to call PL/1 program with some passing
> parms. When I tested Before calling PL/1 program Cobol displays the
> correct values. But the PL/1 Programs Not taking it    and always shows
> blanks, finally PL/1 abends because of No values being passed.
> My question  is there anything special I have to pass.
> Example:
>    C1 is cobol program
>    P1 PL/1 program
> In cobol
>    Call Pl using Address by (d2 )
> Where has d2 is character field in both programs.
> Help me please.

What the heck kind of call is that? I've never seen "Address by" in COBOL; and
why did you put the d2 in parentheses?

You didn't mention your compiler versions or operating system platform, but
here's the skinny for the latest compilers on the OS/390 platform:

In your COBOL program:

           CALL P1 using d2

In your PL/I program:

P1: proc (d2);

      dcl d2 char(10);

No big deal.

Regards,

Steve Comstock
Telephone: 303-393-8716
www.trainersfriend.com

256-B S. Monaco Parkway
Denver, CO 80224
USA



Tue, 23 Sep 2003 19:56:40 GMT  
 Cobol calling Pl/1 program

Quote:

>   I have a cobol program which has to call PL/1 program with some passing
>parms. When I tested
>Before calling PL/1 program Cobol displays the correct values. But the PL/1
>Programs Not taking it    and always shows blanks, finally PL/1 abends
>because of No values being passed.

I haven't done this in a very long time. But when I did this, it was
necessary to intialize the PL/1 environment by issuing a call to
PLISTART before the first call to the PL/1 program.  

Also, there are lots of gotchas in handling data types and arrays
between the two languages.  Make sure that everything matches up and
that you are not using compiler options that affect the field mapping.

Best place to start, the PL/1 Programmers Guide.  It will have a
section on doing this.

                                        Scott Peterson
--
The early bird may get the worm,
but the second mouse gets the cheese



Thu, 25 Sep 2003 01:54:48 GMT  
 Cobol calling Pl/1 program
Assuming the question is for the IBM mainframe environment, it depends on
whether you are using current/supported versions of the COBOL and PL/I
compilers.  If you are using the LE run-time and "supported" compilers, then
you should check out the ILC programming guide at:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/CEEA4100/C...
S

(There are "earlier" versions of this manual, but that is the most recent
one)

--
Bill Klein
 wmklein <at> ix.netcom.com

Quote:

> >   I have a cobol program which has to call PL/1 program with some
passing
> >parms. When I tested
> >Before calling PL/1 program Cobol displays the correct values. But the
PL/1
> >Programs Not taking it    and always shows blanks, finally PL/1 abends
> >because of No values being passed.

> I haven't done this in a very long time. But when I did this, it was
> necessary to intialize the PL/1 environment by issuing a call to
> PLISTART before the first call to the PL/1 program.

> Also, there are lots of gotchas in handling data types and arrays
> between the two languages.  Make sure that everything matches up and
> that you are not using compiler options that affect the field mapping.

> Best place to start, the PL/1 Programmers Guide.  It will have a
> section on doing this.

>                          Scott Peterson
> --
> The early bird may get the worm,
> but the second mouse gets the cheese



Thu, 25 Sep 2003 04:39:44 GMT  
 Cobol calling Pl/1 program
Symbol - Type  ADDR  Length  Tname 1    Tdate 1  Tname 2    Tdate 2 A/R mode
-------- ---- ------ ------ ---------- -------- ---------- -------- --------
C1           SD    00000   38B4 COBOL/390  01/04/05
ANY/ANY

P1          SD   00080   1CB8 LE/370 PLI 01/04/05
ANY/ANY
 P1         LD   00088

 I tried that also.  like Program C1 calling P1.  D1 char (8) in both
programs.
Still its giving return code 1000 and On code 8084.


Quote:
> SankarRavi writes ..

> Guru,

> >  I have a cobol program which has to call PL/1 program with some passing
> > parms. When I tested Before calling PL/1 program Cobol displays the
> > correct values. But the PL/1 Programs Not taking it    and always shows
> > blanks, finally PL/1 abends because of No values being passed.

> > My question  is there anything special I have to pass.

> > Example:

> >    C1 is cobol program

> >    P1 PL/1 program

> > In cobol

> >    Call Pl using Address by (d2 )

> > Where has d2 is character field in both programs.

> > Help me please.

> What the heck kind of call is that? I've never seen "Address by" in COBOL;
and
> why did you put the d2 in parentheses?

> You didn't mention your compiler versions or operating system platform,
but
> here's the skinny for the latest compilers on the OS/390 platform:

> In your COBOL program:

>            CALL P1 using d2

> In your PL/I program:

> P1: proc (d2);

>       dcl d2 char(10);

> No big deal.

> Regards,

> Steve Comstock
> Telephone: 303-393-8716
> www.trainersfriend.com

> 256-B S. Monaco Parkway
> Denver, CO 80224
> USA



Thu, 25 Sep 2003 11:56:26 GMT  
 Cobol calling Pl/1 program
I don't recognize this listing snippet:

Quote:
> Symbol - Type  ADDR  Length  Tname 1    Tdate 1  Tname 2    Tdate 2 A/R mode
> -------- ---- ------ ------ ---------- -------- ---------- -------- --------
> C1           SD    00000   38B4 COBOL/390  01/04/05   ANY/ANY
> P1           SD    00080   1CB8 LE/370 PLI   01/04/05   ANY/ANY
> P1           LD    00088

Is this some sort of home-grown utility or pre-processor? Are you running
OS/390, VM, VSE or some other operating system?

Perhaps you could cut and paste the following lines of code / listing:

1. from C1, compiler options in effect
                 data division definition of variable being passed
                 call of P1

1. from P1, compiler options in effect
                 PROC for the program (must not contain OPTIONS(MAIN), you
know)
                 DCL for the incoming parameter

Regards,

Steve Comstock
Telephone: 303-393-8716
www.trainersfriend.com

256-B S. Monaco Parkway
Denver, CO 80224
USA



Thu, 25 Sep 2003 20:45:02 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Calling a COBOL program from a PL/1 program

2. Calling a COBOL program from a PL/1 program

3. Calling a non-COBOL program from a COBOL program on OS/390

4. COBOL II calls to OS/VS COBOL programs in batch

5. COBOL calls to PL/I

6. COBOL calls to PL/I moduls (more especifications)

7. Calling COBOL From PL/1

8. COBOL calls to PL/I

9. Trying to dynamically call Cobol subroutine from PL/I.

10. Calling COBOL From PL/1

11. Calling PL/I from COBOL/MVS

12. Calling PL/I procedures from COBOL?

 

 
Powered by phpBB® Forum Software