Figure 3-16. Sample Command Shell - HP TACL Programming Manual

Tandem advanced command language
Table of Contents

Advertisement

Figure 3-16. Sample Command Shell (Page 1 of 4)
?SECTION restrictive_command_shell ROUTINE
#PUSH #OUTFORMAT
#SET #OUTFORMAT PRETTY
== Define the code that handles exceptions
[#CASE [#EXCEPTION]
|_CALL|
#FRAME
#PUSH err cmd prompt condition recovery
#PUSH name step
#SET condition 0
display_initial_message
|_BREAK|
#OUTPUT /HOLD/ BREAK key hit during~_
[#OUTPUT [#IF NOT [#EMPTYV name] |THEN|
[name] at step [step]
|ELSE|
input
] == end of #IF
]
== end of #OUTPUT
#SETMANY condition recovery , 1 REQUIRED
|_ERROR|
#OUTPUT Error occurred during [name] at step
#OUTPUT [step]
#ERRORTEXT /CAPTURE err/
#OUTPUT The error is:
#OUTPUTV
err
#SETMANY condition recovery , 1 REQUIRED
|EOF|
#OUTPUT CTRL/Y will not break me
|EXIT|
#RESET FRAMES RESULTS
#RETURN
]
== Body of the routine--enable four exception types:
#FILTER _BREAK _ERROR EOF EXIT
#OUTPUT
[#LOOP |DO|
[#IF condition = 1 |THEN|
#SET prompt An error condition exists--select &
COLDSTART or SHUTDOWN:~_~_
|ELSE|
#SET prompt Select WARMSTART, COLDSTART, SHUTDOWN, &
or EXIT:~_~_
]
107365 Tandem Computers Incorporated
Developing TACL Routines
Writing an Exception Handler
3–27

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents