1833030 Members
2628 Online
110049 Solutions
New Discussion

Cobol to C

 
SOLVED
Go to solution
Vicente Sanchez_3
Respected Contributor

Cobol to C

Hi all,

I have a Cobol program that calls to a subroutine in C.

I should be assigning bad the fields because the result is not the expected.

Can you take it a look and comment what's wrong?.

Attached are the cobol program, C program and results.

Thanks, Vicente.

2 REPLIES 2
Steve Steel
Honored Contributor

Re: Cobol to C

Jean-Luc Oudart
Honored Contributor
Solution

Re: Cobol to C

Hi Vincente,

one difficulty is strings finbish with \0 in C not in Cobol. the Cobol program has to prepare its variable before passing to the C subroutine.
+ you have to add pointer definition.
cf. attachment

Jean-Luc

PS : sorry for the format of the attchment, but I'm sure you will rectify by yourself
fiat lux