Security Management Guide (G06.29+, H06.08+, J06.03+)
TACL Macros
Security Management Guide — 522283-021
C - 4
Example 3. Fapply Routine
existence,
code,
eof,
licensed,
modification,
owner,
progid,
security
/ [:^fullname] ]
]
[#if (:^existence)
== did file exist?
|then|
== yes -- check fields and report errors:
:^check CODE
:^check EOF
:^check LICENSED
:^check MODIFICATION
:^check OWNER
:^check PROGID
:^check SECURITY
|else|
== no -- file disappeared
#output [:^fullname] has been PURGED.
]
]
#unframe
==
To invoke snapshotcheck, enter SNAPSHOTCHECK and the name of the snapshot file
at the TACL prompt. For example, this command reports status changes of files whose
status was previously saved in the file named snapsys:
2> SNAPSHOTCHECK snapsys
Example 3. Fapply Routine
This routine is used by the snapshot routine (Example 1) and the snapshotcheck
routine (Example 2):
?section fapply ROUTINE
#frame
#push :^macro :^template :^curfile
#if [#argument /value :^macro/ variable]
== first argument is routine to apply
[#loop |while| [#more] |do|
[#case [#argument /text :^template/ token/token @/ [
]template end]
== is it at-sign, filename, or end?
| 1 token |
== at-sign:
[#case [#argument /text :^curfile/ filename [
]filename/syntax/]