/Qedit Command
When you execute a command file (or a UDC) from within Qedit, you can also include Qedit commands in the command file by preceding the Qedit commands with a slash (for example,/find "text"
).
/command line
(Defaults: none)
Qedit allows you to include Qedit command lines within UDCs and command files. You can check the result of the /Qedit command by testing CIERROR:
setjcw CIERROR = 0 continue /open abc.source /find "def" if CIERROR=0 then /delete * else if CIERROR=860 then display Invalid syntax in Qedit command! else if CIERROR=900 then display End of file - string not found! else if CIERROR=907 then display Non-existent file! endif endif endif endif
As this example shows, the /Qedit command returns one of three CIERROR values:
860 = Illegal Keyword
907 = Non-Existent File
900 = End Of File (returned by Find and Findup)
Note that these CIERROR values are only set when the commands are being executed from a User Command, not from $stdin or a usefile.
INSIDEQEDIT JCW
You can test whether your command file is being executed by Qedit by having it check the INSIDEQEDIT job control word, so as to only execute /Qedit commands while inside Qedit.