Subject: | |
From: | |
Reply To: | |
Date: | Tue, 7 Jul 1998 11:32:11 +0200 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Greetings,
I have not having much fun creating a Cobol routine and inserting it
into an XL and then calling it from C. Yes, I have searched the
archive, but did not solve my problem with some of the information
gleaned. Does anybody have a simple example that they wish to share
with the list.
More precisely, my problems is simply that when I pass the address of an
integer to the Cobol routine the Cobol routine always receives an
integer of value 0 and when I modify the integer in Cobol when printed
in C I get the incorrect value.
Code samples.
C 'client side'
char request[256];
char response[4096];
int integer;
democall(&request, &response, &integer);
Cobol 'server side'
LINKAGE SECTION.
01 REQUEST PIC X(256).
01 RESPONSE PIC X(4096).
01 SIZE-OF-BUFFER PIC S9(4) COMP.
PROCEDURE DIVISION USING REQUEST,
RESPONSE,
SIZE-OF-BUFFER.
All help greatly appreciated.
Regards
Jens
|
|
|