COBOL Link to CMD.EXE or NET.EXE on Win

COBOL Link to CMD.EXE or NET.EXE on Win

Post by kkinne » Fri, 26 Sep 2003 04:37:39


I'm able to make calls to other COBOL programs, but the normal tricks
don't work when trying to link to CMD.EXE or NET.EXE.

Does anyone know how to do this? (I'm using VACOBOL, if it makes a
difference.)

Regards,
Kevin Kinney
 
 
 

COBOL Link to CMD.EXE or NET.EXE on Win

Post by Grinde » Fri, 26 Sep 2003 14:38:14


normal tricks
makes a

Are you trying to execute a console command, or just execute a
program from a console?

 
 
 

COBOL Link to CMD.EXE or NET.EXE on Win

Post by rkrayhaw » Sat, 27 Sep 2003 09:22:07

Tell us more about your 'normal tricks'.

Actually, you are not calling other COBOL porgrams in the cases where you are
succeeding. Instead you are calling submodules, the interface into these
matches the expectation of the CALL.

If you can infact call other languages from your development environment, then
create a C language object module (one with just the function you can call from
COBOL, no main() in the C routine). Have that intermediate do a C
exec()
or
spawn()

Some COBOLs may not have that facility built-in. You will need to learn enough
about calling submodules across languages to get your COBOL parms down to the C
intermediary, so that it can do the exec() or spawn() you want dynamically.

There may be system calls or execute verbs in some COBOLs, and maybe someone
knows that particular in VACOBOL. But the various *.EXE files you name are not
subroutines so the bindings to those do not look at all like a COBOL sub
program.

Tell us more about your 'tricks.'