Article View: comp.os.os2.programmer
Article #2112Re: Example code to insert cmd files in startup folder
From: Horst Kiehl
Date: Fri, 16 Oct 1992 10:06
Date: Fri, 16 Oct 1992 10:06
44 lines
2119 bytes
2119 bytes
In article <3kqosB2w165w@cybernet.cse.fau.edu>, rob@cybernet.cse.fau.edu (Robert Rittenhouse) writes: >dic5340@hertz.njit.edu (David Charlap) writes: >> Be sure to end the >> file with an "exit" statement or the window will remain open at a >> prompt. > The OS/2 Command >Window stays open even though the file ends with EXIT. What am I >missing here: Code follows >/* Clear startup programs from OS2.INI */ > call RxFuncAdd 'SysIni','RexxUtil','SysIni' > call SysIni,'PM_WorkPlace:Restart','DELETE:' > call SysIni,'FolderworkareaRunningObjects','DELETE:' > exit The EXIT meant by David Charlap is the command, not the REXX statement. When the OS/2 command interpreter (CMD.EXE) sees that the *.CMD file starts with /*, it calls REXX to interpret the file, processing only the commands it gets from there. Otherwise, CMD.EXE processes the file itself. Your example code is a REXX program. The CALLs in it are REXX instructions (calling OS/2-specific REXX subroutines). The EXIT at it's end is the REXX instruction to exit the program. To exit CMD.EXE, the REXX program has to pass to it the command requesting this, which has the same name as the REXX instruction. Replace the line exit with the line 'EXIT' (you could type it lowercase, but this way it's easier to distinguish). Best wishes, Horst
Technical Details
Message-ID:
<327@zam103.zam.kfa-juelich.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!gatech!utkcs2!darwin.sura.net!Sirius.dfn.de!zam103!ibt013!kiehlReferences:
<1992Oct14.214004.2160@njitgw.njit.edu> <3kqosB2w165w@cybernet.cse.fau.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!utkcs2!darwin.sura.net!Sirius.dfn.de!zam103!ibt013!kiehl From: kiehl@ibt013.ibt.kfa-juelich.de (Horst Kiehl) Newsgroups: comp.os.os2.programmer,comp.os.os2.misc Subject: Re: Example code to insert cmd files in startup folder Keywords: exit, REXX Message-ID: <327@zam103.zam.kfa-juelich.de> Date: 16 Oct 92 10:06:54 GMT References: <1992Oct14.214004.2160@njitgw.njit.edu> <3kqosB2w165w@cybernet.cse.fau.edu> Sender: news@zam103.zam.kfa-juelich.de Reply-To: kiehl@ibt013.ibt.kfa-juelich.de (Horst Kiehl) Followup-To: comp.os.os2.programmer Organization: Forschungszentrum Juelich GmbH (KFA), Germany Lines: 44 Nntp-Posting-Host: ibt013