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

TACL Macros
Security Management Guide522283-008
C-3
Example 2. Snapshotcheck Routine
:^licensed :^licensed2
:^modification :^modification2
:^owner :^owner2
:^progid :^progid2
:^security :^security2
:^infilename
:^infiledata
]
== define subroutine :^CHECK to compare two values:
[#def :^check macro |body|
[#if [_comparev :^%1% :^%1%2]
== see if :^FOO matches :^FOO2 for argument FOO
|then|
|else|
== nope? say so:
#output [:^fullname] value for %1% changed from [
][:^%1%] to [:^%1%2]
]
]
== mainline:
#if [#argument /value :^infilename/ filename]
== input filename is first argument
#if [#argument end]
#set /in [:^infilename]/ :^infiledata
== fetch the data from input file into variable :^INFILEDATA
[#loop
|while|
(not [#emptyv :^infiledata])
== while "more to do" do:
|do|
== get saved status of file:
[#setmany
:^fullname
:^code
:^eof
:^licensed
:^modification
:^owner
:^progid
:^security
,
[#extract :^infiledata]
]
== get current status of file:
[#setmany
:^existence
:^code2
:^eof2
:^licensed2
:^modification2
:^owner2
:^progid2
:^security2
,
[#fileinfo /