'set novalue on' /* force KEXX and its way of SIGNAL ON NOVALUE */ /* Usage: KEDIT file (PROF XC options) command */ /* Purpose: Kedit file as usual using the default profile */ /* and any specified options. In addition command */ /* is executed, typically a MSG text. */ /* Example: An OS/2 REXX script executes whatever command */ /* redirecting stdout and stderr to a temporary */ /* file. Finally Kedit is used to view the file */ /* and PROF XC displays the return code: */ /* /* XC.CMD */ */ /* TMP = value( 'TMP',, 'OS2ENVIRONMENT' ) || '\XC.TMP' */ /* address CMD '@(2>&1' arg( 1 ) || '| tee' TMP || ')' */ /* address CMD 'kedit' TMP '(PROF XC) msg' rc || ':' arg( 1 ) */ /* Hint: arg( 1 ) should be executed in a CMD subshell, */ /* otherwise CMD.EXE (unlike PREXX30) requires an */ /* explicit CALL to execute other CMD-scripts. A */ /* pipe like @(xyz|TEE) is implicitly a subshell. */ /* Bugs: XC.KEX will be confused if file contains (...). */ /* Requires: Kedit 5.0, OS/2 (Frank Ellermann, 2000) */ 'macro' defprof.1() arg( 1 ) ; if rc <> 0 then exit rc parse arg . '(' . ') ' CMD ; if CMD = '' then exit rc 'refresh' ; 'command' CMD ; exit rc