Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Problem calling C program

$
0
0

I'm using gcc on the AIX machine for C compilations - we don't have IBM's cc and given that we have the grand total of one C program, it's not very likely that we'll be getting it. The programs compile successfully as per original versions, though I have made two minor changes to testc - null byte to terminate ws-name and "by reference" in the call to helloworld. helloworld works quite happily when invoked standalone. I tried putting in an additional call to sprintf

this in working-storage

      01  ws-to-buff                  pic x(80).

      01  ws-line-desc.

          03  filler                  value "Buffer says hello %s".

and this in procedure division

          call "sprintf"              using by reference ws-to-buff

                                            by reference ws-line-desc

                                            by reference ws-name

          display ws-to-buff

and this works. So is it an incompatibility with gcc?


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>