HP3000-L Archives

July 1998, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jens von Bülow <[log in to unmask]>
Reply To:
Jens von Bülow <[log in to unmask]>
Date:
Tue, 7 Jul 1998 11:32:11 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
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

ATOM RSS1 RSS2