HP3000-L Archives

September 2002, Week 2

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:
Bill Cadier <[log in to unmask]>
Reply To:
Bill Cadier <[log in to unmask]>
Date:
Sun, 8 Sep 2002 17:58:43 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (58 lines)
Hi Brian,

You could code the PASCAL procedure as

PROCEDURE get_the_reply ( VAR ws_create_time;
                                                VAR ws_pin_no;
                                                VAR ws_job_no;
                                                VAR ws_msg_text );
BEGIN
...
END;

based on the way your COBOL code was making the call. You'd then move the
results from the AIFSYSWIDEGET call to the parameters above and return to
the COBOL program.

Here's a link to the COBOL doc. on calling procedures. This has more complete
information on "by reference" and "by value" and so forth:

http://docs.hp.com/cgi-bin/doc3k/B3150090013.11820/167

See the section titled "USING Phrase (Non-COBOL Subprograms)".

HTH,

Bill
hp/csy

> All:
>
> I have a Cobol mainline program that needs to call a subroutine written in
> Pascal (to call certain AIF intrinsics). The Cobol call is this:
>
> 01 WS-CREATE-TIME PIC X(08).
> 01 WS-PIN-NO            PIC S9(09) COMP.
> 01  WS-JOB-NO          PIC X(256).
> 01  WS-MSG-TEXT      PIC X(160).
> PROCEDURE DIVISION.
> 0100-MAINLINE.
> ....
> ....
> CALL "get_the_reply" USING WS-CREATE-TIME,
>                                             WS-PIN-NO,
>                                              WS-JOB-NO,
>                                             WS-MSG-TEXT
> END-CALL.
>
> Inside the Pascal source, how do these cobol parms get passed to Pascal, and
> after Pascal has retrieved the system info via the AIF intrinsics how are
> they passed back to the Cobol mainline?
>
> The Pascal source looks like:
>
< snip >

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2