[comp.lang.pascal] Calling Pascal from COBOL -- UGH

V4039%TEMPLEVM.BITNET@uga.cc.uga.edu ( Stan Horwitz) (04/03/91)

  I am new to this list and am not clear yet on whether or not this list
is devoted to a specific version of Pascal.  My question today pertains to
VSPascal on an IBM mainframe.  Since VSPascal has this neato ability to
call cms (operating system) commands from within its program, I would like
to write a vspascal function which could be called from VS COBOL II and
will do the cms command and return the return code to the calling COBOL
program.  Has anyone done this yet. The Pascal program is easy to write,
but I can't seem to get COBOL programs to use this function. My test COBOL
program gives no compile or run-time errors, but also does not do anything
when it calls this Pascal program.

Stan Horwitz, Consultant    | Bitnet           | Internet
Temple University           | V4039@TEMPLEVM   | V4039@VM.TEMPLE.EDU

John G. Spragge <SPRAGGEJ@QUCDN.QueensU.CA> (04/04/91)

Questions: Are you sure you are declaring the routine correctly?
I know old Pascal/VS used to support calls into Pascal from COBOL.
You had to declare the Pascal routine as if it was being called
from FORTRAN. The manual should give you instructions about doing
that.

But I suspect, given your description, that you may have a different
problem: are you sure the program you are calling is a valid subset
command? Look in the CMS manual if you are unsure; the subset commands
are listed. Generally XEDIT, EXECS, and some other commands are ok;
NOTHING you have written in COBOL is. If you need more, send me some
details directly.

disclaimer: Queen's University supplies me with computer services, not
            my opinions.

John G. Spragge