
Using the INLINE Facility
Initiating and Communicating With Processes
5–12
107365 Tandem Computers Incorporated
The macro displays the PERUSE banner and spooled jobs; it then deletes the jobs and
exits.
Figure 5-5. Deleting PERUSE Jobs
?SECTION emptyspool MACRO
#FRAME == Arrange for cleanup
#PUSH #INLINEPREFIX == Save current prefix
#PUSH #INLINETO == Save current INLINETO
#PUSH line == Variable for line at a time
#PUSH jobno == Variable for current job number
#PUSH queue == Variable for output queue
#PUSH del_rslts == Variable for deletion results
#SET #INL == Set prefix wanted here
#SET #INLINETO queue == Use variable to collect summary
PERUSE /INLINE/ == Start PERUSE in inline mode
== The preceding command waits until the PERUSE summary is
== available and PERUSE prompts for its first command
#SET #INLINETO del_rslts == Now store deletion results
== Loop over remaining lines
[#LOOP |WHILE| NOT [#EMPTYV queue] |DO|
#EXTRACTV queue line
[#IF [#MATCH JOB [line]] |THEN|
[#LOOP |WHILE| NOT [#EMPTYV queue] |DO|
#EXTRACTV queue line == Get the next job line
#SETMANY jobno, [line]
+ J [jobno];DEL == Delete the job
]
]
]
+ E == Tell PERUSE to exit
#UNFRAME
Stopping an INLINE Process
An INLINE process remains in existence until one of the following conditions occurs:
The originating process sends an exit message to the process. The exit message
can be defined by the process (such as EXIT for FUP) or can be INLEOF or
#INLINEEOF.
You log off.
The process finishes its work and stops its own execution.
The originating process terminates.