Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!bionet!agate!stanford.edu!morrow.stanford.edu!news From: GD.SAR@forsythe.stanford.edu (Sandy Rockowitz) Newsgroups: comp.os.os2.programmer Subject: Re: '.cmd' return codes Message-ID: <1991Apr10.231655.15841@morrow.stanford.edu> Date: 10 Apr 91 23:16:55 GMT Sender: news@morrow.stanford.edu (News Service) Distribution: usa Organization: Data Center, Stanford University, California, USA Lines: 17 In article <18503@ncratl.AtlantaGA.NCR.COM>, tmeiners@ncratl.AtlantaGA.NCR.COM (Tedd Meinersmann) writes: >I would like to get a return code from a executable file (.cmd or .exe) >when I execute the file from within my 'C' code. > [text deleted] > >For OS/2 (MicroSoft C 6.0) 'cmd.exe' does not return an exit status of >the '.cmd' or '.exe' file that it executed. There is no 'exit' equivalent >of '.cmd' programming to force a return code. > Tedd, If you are using IBM OS/2, you can use .CMD files written in Rexx. Rexx allows you to set the return code. Sandy Rockowitz gd.sar@forsythe.stanford.edu