HP TACL Programming Manual page 132

Tandem advanced command language
Table of Contents

Advertisement

Initiating and Communicating With Processes
Using $RECEIVE
5–24
Figure 5-10. Sending Messages to a Terminal (Page 3 of 3)
|OTHERWISE|
== The user did not supply a device name.
== text.
output_help_text
#UNFRAME
#RETURN
] == end of outer #CASE
== Obtain the current time
== Note:
the underscores act as placeholders for unwanted
== text.
#SETMANY _ _ _ origin_time_hh origin_time_mm, &
[#CONTIME [#TIMESTAMP]]
[#IF (origin_time_mm < 10) |THEN|
== If the minute value in the timestamp is less than 10,
== add a zero to the front of the number to keep it at
== two digits.
#SET origin_time_mm 0[origin_time_mm]
]
#SET origin_time [origin_time_hh]:[origin_time_mm]
== Build the message
#SET message [L25:char(0:1)][origin_time] == Line 25
#SET message [message] [#USERNAME
[#PROCESSINFO/PAID/[#MYPID]]]
#SET message [message] [temp_message]
== Open the destination device
#SET req_status [#REQUESTER WRITE [destination_name] &
error send_message]
[#IF ( req_status <> 0 ) |THEN|
== The open failed.
#OUTPUT The open of the terminal failed with Guardian &
Error [req_status].
#UNFRAME
#RETURN
]
#APPENDV send_message message
[#IF [#MATCH [#VARIABLEINFO/VARIABLE/ &
[#WAIT send_message error]] error] |THEN|
#OUTPUT Write to the terminal failed:
]
#SET req_status [#REQUESTER CLOSE error]
[#IF ( req_status <> 0 )
|THEN|
#OUTPUT Close of the terminal failed:
[req_status]
]
#OUTPUT Message to [destination_name] Transmitted
#UNFRAME
107365 Tandem Computers Incorporated
== Orig userID
== The message text
Report the error and exit.
== Send the message
Guardian Error [error]
== Close failed
Guardian Error &
Display help

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents