Home > Archive > Cobol > July 2004 > call cobol from pl/i using pointers
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
call cobol from pl/i using pointers
|
|
| Piero Crincoli 2004-07-29, 8:55 am |
| I have to write a cobol routine called from pl/i.
In pl/i I have:
pointer1=addr(area1)
pointer2=addr(area2)
call routine(pointer1, pointer2, variable1, variable2).
What about cobol program? Is the following correct?
linkage section.
01 pointer1
01 area1
01 pointer2
01 area2
01 variable1
01 variable2
procedure division using pointer1, pointer2, variable1, variable2.
set address of area1 to pointer1
set address of area2 to pointer2
...
thanks piero
| |
| Robert Wagner 2004-07-29, 8:55 am |
| piero.crincoli@infoconsulting.it (Piero Crincoli) wrote:
>I have to write a cobol routine called from pl/i.
>
>In pl/i I have:
>
>pointer1=addr(area1)
>pointer2=addr(area2)
>call routine(pointer1, pointer2, variable1, variable2).
>
>What about cobol program? Is the following correct?
>
>linkage section.
> 01 pointer1
> 01 area1
> 01 pointer2
> 01 area2
> 01 variable1
> 01 variable2
>
>procedure division using pointer1, pointer2, variable1, variable2.
> set address of area1 to pointer1
> set address of area2 to pointer2
Yes, it appears to be correct.
| |
| William M. Klein 2004-07-29, 3:55 pm |
| If you are running in a (supported) IBM mainframe environment, then I would
suggest you review the chapter
" Chapter 11. Communicating between COBOL and PL/I "
In the ILC (Inter-Language Call) manual at:
http://publibz.boulder.ibm.com/cgi-...A4120/CCONTENTS
This will answer this (and a variety of other) questions.
If you are NOT running on an IBM mainframe, then the answer to your question is
"probably - but not necessarily"
--
Bill Klein
wmklein <at> ix.netcom.com
"Piero Crincoli" <piero.crincoli@infoconsulting.it> wrote in message
news:60905137.0407290131.c4b9854@posting.google.com...
> I have to write a cobol routine called from pl/i.
>
> In pl/i I have:
>
> pointer1=addr(area1)
> pointer2=addr(area2)
> call routine(pointer1, pointer2, variable1, variable2).
>
> What about cobol program? Is the following correct?
>
> linkage section.
> 01 pointer1
> 01 area1
> 01 pointer2
> 01 area2
> 01 variable1
> 01 variable2
>
> procedure division using pointer1, pointer2, variable1, variable2.
> set address of area1 to pointer1
> set address of area2 to pointer2
> ...
>
> thanks piero
| |
| S Comstock 2004-07-29, 3:55 pm |
| Piero Crincoli writes ...
>I have to write a cobol routine called from pl/i.
>
>In pl/i I have:
>
>pointer1=addr(area1)
>pointer2=addr(area2)
>call routine(pointer1, pointer2, variable1, variable2).
>
>What about cobol program? Is the following correct?
>
>linkage section.
> 01 pointer1
> 01 area1
> 01 pointer2
> 01 area2
> 01 variable1
> 01 variable2
>
>procedure division using pointer1, pointer2, variable1, variable2.
> set address of area1 to pointer1
> set address of area2 to pointer2
Looks good to me on a cursory inspection. But you haven't told us the compilers
nor the operating system - there may be some differences that are important
based on your context.
Kind regards,
-Steve Comstock
800-993-9716
303-393-8716
www.trainersfriend.com
email: steve@trainersfriend.com
256-B S. Monaco Parkway
Denver, CO 80224
USA
|
|
|
|
|