Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

call cobol from pl/i using pointers
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

Report this thread to moderator Post Follow-up to this message
Old Post
Piero Crincoli
07-29-04 01:55 PM


Re: call cobol from pl/i using pointers
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.

Report this thread to moderator Post Follow-up to this message
Old Post
Robert Wagner
07-29-04 01:55 PM


Re: call cobol from pl/i using pointers
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:

[url]http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/CEEA4120/CCONTENTS[/url
]

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



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
07-29-04 08:55 PM


Re: call cobol from pl/i using pointers
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 compil
ers
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

Report this thread to moderator Post Follow-up to this message
Old Post
S Comstock
07-29-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:40 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.