Between our two email programs, it's getting ugly.  I'm going to hack off a 
bunch of it.

At 05:31 PM 5/11/2006, Jon Stonecash wrote
>I have been hacking away at this for a couple of days.  I am definitely 
>getting punchy.  Let me see if I can answer all of your questions:
>
>The COM interface is provided by AcuCobol.  That is the interface that I 
>included in my email.  That is a given.
>
>The relevant parts of the COBOL code look like this:

Out of curiosity, do you know why there aren't line-breaks in what came 
through?  I've put them in (but I don't know what the indentation should be) in 
the parts quoted back here.

>       PROCEDURE DIVISION USING VARIANT-COUNT, VARIANT-ARRAY.
>             MAIN-LINE-SECTION SECTION.
>        MAIN-LINE.
>             CALL    "C$GETVARIANT"   USING
>                     VARIANT-COUNT
>                    WS-COUNT.
>               IF      WS-COUNT         > 3
>                    MOVE             3 TO WS-COUNT
>                    END-IF.
>            PERFORM VARYING WS-INDEX FROM 1 BY 1
>               UNTIL WS-INDEX > WS-COUNT
>              CALL "C$GETVARIANT" USING
>                VARIANT-ARRAY(WS-INDEX)
>                WS-STRING-PARM(WS-INDEX)
>              END-CALL
>            END-PERFORM.

When the AcuCobol COM method Call calls a program, it apparently passes the 
number of actual parameters that were passed followed by the parameters that 
were passed as an array.  (That's a guess based on the code you have that 
presumably is similar to some sample code that shows how to address the data 
that came across.)

Have you checked what WS-COUNT is in the Cobol program?  I think it's probably 
1 -- remember, you passed only ONE parameter (that's an array of 3 elements).  
Your code would (I think) be working if you had passed the 3 strings in 3 
separate parameters -- not that it's what you want.,

I think you need to find out how to address the individual items of an array 
that's passed into the Cobol code -- in .Net terms, how to "unbox" the array 
from the VARIANT parameter that was passed.  Is there docn of C$GETVARIANT that 
mentions what to do if the variant is an array?  I think the AcuCobol people 
could help with that.

Sorry not to be able to help more.  Good luck!

[email-munged message remnants snipped]

J. Merrill / Analytical Software Corp

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to