Security Management Guide (G06.24+, H06.03+)

TACL Macros
Security Management Guide522283-008
C-6
Example 5. Lock Routine
| otherwise |
]
#unframe
To use this macro, load it into your TACL along with the fapply routine. Then, to scan
all files on $SYSTEM.SYSTEM (for example):
3> FAPPLY FINDONE $system.system.*
Example 5. Lock Routine
This TACL routine locks a terminal at the request of the user:
?section lock ROUTINE
[#case [#exception]
== How did we get entered?
| _CALL |
== First entry -- establish parameters:
#frame
#filter EXIT
== might get out of here with #raise EXIT
[#push
:^pw1 :^pw2 :^prompt
:^wrong :^wrongs
:^_clschars #breakmode
]
== working variables
[#def :^a delta |body|
27i 73i 15i hx:^_clschars$ hk ^\
]
#delta/commands :^a/
#pop :^a
== now :^_clschars has 6530-family clear-screen characters
[#def :^toascii routine |body|
== this subroutine converts a variable into numbers
== for example, a variable containing "ABC"
== gets turned into 065066067
#frame
#push :^v :^d
#if [#argument /value :^v/ variable/allow text/]
#if [#argument end]
[#set /type delta/ :^d
g[:^v]$
-1,0a?n 0i'
j z < -3,1a\d >
hx[:^v]$ hk ^\
]
#delta/commands :^d/
#unframe
]
[#case [#argument token/token !/ end]
| 1 ! |
#set :^wrongs NEVER
#if [#argument end]
| 2 end |