Figure 5-8 Directing Fup Output To A Log File - HP TACL Programming Manual

Tandem advanced command language
Table of Contents

Advertisement

Initiating and Communicating With Processes
Using INV and OUTV
5–18
Use the macro in Figure 5-8, fup2, to modify a FUP operation so that user requests
and FUP responses are recorded in a log file. The syntax is:
fup2 fup-command
where fup-command is a valid FUP command. The macro logs the request, the time
of the request, and the FUP output to a file called LOGFILE. The macro displays the
contents of LOGFILE before exiting.
Figure 5-8. Directing FUP Output to a Log File
?SECTION fup2 MACRO
#FRAME
#PUSH errvar,fupout,logvar,result
== Open logfile for writing
SINK [#REQUESTER /WAIT/ WRITE logfile errvar logvar]
#APPEND logvar &
[#CONTIME [#TIMESTAMP]]: FUP %*%
== Write a log record
$SYSTEM.SYSTEM.FUP /OUTV fupout/ %*%
[#LOOP |WHILE| NOT [#EMPTYV fupout]
== Retrieve FUP output
[#SET result [#EXTRACT fupout] ]
#APPEND logvar [result]
]
SINK [#REQUESTER CLOSE logvar]
#OUTPUT The log contains:
FUP COPY logfile
#UNFRAME
107365 Tandem Computers Incorporated
== Create variables
FROM TERMINAL [#MYTERM]
== Invoke FUP
|DO|
== Write FUP result to logfile
== Close logfile
== Remove variables

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents