Steve Comstock made some helpful suggestions; my big problem was having a comma 
before the "LIST" keyword. Making progress but not there yet.

So now I have:
  Declare MYFUNC  External('MYFUNC') Entry(
           Char(*) byaddr,
           Char(*) byaddr,
           Fixed Bin(31) byaddr
           list
          )
          returns( byvalue Fixed Bin(31) )
          options ( nodescriptor );

So that compiles and runs, BUT it appears not to be setting the high bit on the 
last parameter. So if I issue:
  rc = MYFUNC(parm1,
               input,
               inputLength,
               output,
               outputLength,
               error);

I get RC=0 and the input has been processed to the output as expected.

But if instead I issue:
  rc = MYFUNC(parm1,
               input,
               inputLength);

which works from COBOL, the function should put the output in the input buffer. 
It doesn't: if I make the "short form" call first, it complains that the output 
length is too long. If I make the "long form" call first, then reset the output 
buffer to a known value and issue the "short form" call, I get RC=0 *and the 
output buffer has been updated as if I'd specified it*. That made me think the 
old parameter value is lying around in the work PLIST used by the compiler, and 
the high bit isn't getting set.

Ah HAH, sez I, after searching for "high-order bit": LINKAGE(SYSTEM) is what I 
need! Nope:
IBM2019I S       9.1    Unsupported LINKAGE used with the LIST attribute.

So if you can't use LIST with LINKAGE(SYSTEM), how is the called routine 
supposed to know the end of the plist?
--
...phsiii

Phil Smith III
[email protected]<mailto:[email protected]>
Voltage Security, Inc.
www.voltage.com<http://www.voltage.com>
(703) 476-4511 (home office)
(703) 568-6662 (cell)


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to