Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I call the Windows operating system from PC COBOL

COBOL Weblers

How can I call the Windows operating system from PC COBOL

by  CliveC  Posted    (Edited  )
Calling the windows operating system, for example to call a .BAT command, opens up lots of possiblities. See faq209-4551 for an example of starting up a browser.

In thread209-1053829, others were asked to contribute entries for how to call the Windows operating system in their COBOL versions.

Here is a summary:

ACUCOBOL contributed by landei
CALL "c$system" USING system-command-line.

MICRO FOCUS COBOL contributed by PHV
CALL "SYSTEM" USING Null-Terminated-Command-Line

RM/COBOL contributed by k5tm
CALL "SYSTEM" USING Command-Line

AS400 COBOL and ILE-COBOL contributed by fredericofonseca
Not the same environment, but with AS400 COBOL and ILE-COBOL you can just call almost any program directly. For the situations where you can't, then the creation of a CL program is the easy solution. Alternatively one can call "qcmdexc" with is the equivalent of the call "system" or call "c$system" from other PC compilers.
Very easy and you can get parameters passed back if needed.

PLEASE RESPOND TO THE ORIGINAL thread209-1053829 IF YOU HAVE ANY ADDITIONS.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top