Steve Comstock wrote:
>I'm confused here, because the title of the thread
>is 'C calling HLASM' and here we are talking about
>PL/I.
Yeah, true...topic drift. Renamed.
>So what's really going on here that is the mystery?
>My guess is: you have a C function that you want to
>call from, in this instance, a PL/I program. Right?
Right.
>Can you show us the definition of the C function
>(not the body, just the definition of parameters
>along with any pragma statements you might have,
>and compiler options relevant to calls / function
>references)?
See below.
>Can you show us how you invoke the function from
>C, COBOL, and Assembler? That is, some sample calls
>or function references that work successfully, both
>with two arguments and four arguments (BTW: do you
>allow the output buffer to be specified without the
>last length argument? How about no output buffer
>but with a length? In other words, must the user
>specify exactly two or exactly four arguments?)
The previous post had an example from COBOL; C is the same, only in C syntax.
Assembler too. We validate that we got three or five arguments (note there's an
initial, required argument).
>Finally: there are some differences in the Enterprise
>PL/I compiler regarding compile time options and
>options available for declaring functions and
>subroutines so I ask this: is your expectation that
>your customers will be running the Enterprise PL/I
>compiler or some earlier compiler?
Here's a C prototype, with the serial numbers filed off:
int THEFUNCTION( char *magic,
char *inputBuffer,
int *inputLength,
...)
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN