TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-272
#OPENINFO Built-In Function
Example
This routine accepts a file or device name and “processes” (simulation only) all the
openings of that file or device.
?SECTION lookopen ROUTINE
#FRAME
== Make some temps
#PUSH searchname error tag processid primary backup
== Get the argument
#IF [#ARGUMENT/VALUE searchname/ FILENAME DEVICE]
#IF [#ARGUMENT END]
== Start with first opening
#SET tag 0
== Loop until error
[#LOOP |DO|
== Get information using previous tag
[#SETMANY
error tag processid primary backup
,
[#OPENINFO/PROCESSID,PRIMARY,BACKUP/ [searchname] [tag]]
]
== Check for error
[#IF (error = 0) |THEN|
== No error; process the open-information
...
] { End IF }
|UNTIL| (error <> 0)
] { End LOOP }
== Error 1 is normal termination
[#IF (error <> 1) |THEN|
#OUTPUT Error [error] on [searchname]
]
== Clean up
#UNFRAME