Re: Parameters changing to NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes that is the issue. 

There is a C to COBOL API that let’s you specify how many parameters are being passed. 

Cheers,
Ron Norman

On Aug 17, 2021, at 20:29, Michael Potter <pottmi@xxxxxxxxx> wrote:



We think we know what is going on.

We have COBOL calling C calling COBOL.

COBOL calls C with 1 parameter.
C calls COBOL with 2 parameters.

There is code in the cobol runtime system that is checking the number of parameters it was called with and NULLING out any "Extra" parameters.
But the code assumes that the number of parameters passed from COBOL To C (1) is still in effect when C calls COBOL.

does this make sense?

What is the best way to code around this?


On Mon, Aug 16, 2021 at 5:39 AM Martin Ward <martin@xxxxxxxxxx> wrote:
On 16/08/2021 02:25, Michael Potter wrote:
> If nothing else...   Please tell me how I can see the generated C code
> so I can study what might be happening.

cobc -C *.cbl

-C translation only; convert COBOL to C

--
                        Martin

Dr Martin Ward | Email: martin@xxxxxxxxxx | http://www.gkc.org.uk
G.K.Chesterton site: http://www.gkc.org.uk/gkc | Erdos number: 4

[Index of Archives]     [Gcc Help]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Info]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux