Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messagepiero.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.
Post Follow-up to this messageIf 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
Post Follow-up to this messagePiero 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
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.