TACL Reference Manual

UTILS:TACL Commands and Functions
HP NonStop TACL Reference Manual429513-018
8-165
RUN[D|V] Command
USER2 (who does not have write access to PROG) can also run PROG, provided
the library LIBFILE has not been altered since its last use. If LIBFILE has changed,
however, and USER2 enters:
12> RUN PROG / LIB LIBFILE /
the attempt to run the program fails because USER2 does not have write access to
PROG so that external references can be resolved through the changed library file.
When you give a RUN command and the new process begins execution, TACL
pauses unless your RUN command includes the NOWAIT option. If the new
process does not take over break ownership, you can activate TACL while the
process runs by pressing the BREAK (or interrupt) key. TACL then runs
concurrently with the process. You can return TACL to its waiting state with the
PAUSE command.
If you specify the NOWAIT option in your RUN command, TACL returns to the
command input mode as soon as the new process reads its startup message.
Thus, NOWAIT means you do not have to wait for the new process to finish before
you can enter other commands. NOWAIT is especially useful when you start
several programs using the IN file-name option. The INLINE option also produces
the effect of the NOWAIT option.
You can use the STATUS option to avoid race conditions. For example, assume a
macro runs the same program more than once:
RUN laps /INV iv1 DYNAMIC,OUTV ov1,NOWAIT,NAME $z
STOP $z
RUN laps /INV iv2 DYNAMIC,OUTV ov2,NOWAIT,NAME $z/
The second time the program is run, if TACL receives the OPEN system
interprocess message for the second process’s IN file before it receives the STOP
interprocess message for the first process, the process could receive a
“nonexistent file” error when it tries to open its IN file.
Before starting a second process with the same name as the first, the macro must
wait for the STOP command to finish. You can make the macro wait by providing a
STATUS variable in the first RUN command, then using the #WAIT built-in function
to ensure that TACL receives notification that the first process has stopped before
it starts the second one.
For example:
RUN laps /INV iv1 DYNAMIC,OUTV ov1,NOWAIT,NAME $z,STATUS
zs/
STOP $z
#WAIT zs
RUN laps /INV iv2 DYNAMIC,OUTV ov2,NOWAIT,NAME $z/
To run a process on a remote system, specify \ node-name before the name of a
program file. For example, this command runs a TEDIT process on the \CHICAGO
system:
14> \CHICAGO.TEDIT