Monitoring Job Status: ENQUIRY
Initiating and Communicating With Processes
107365 Tandem Computers Incorporated
5–35
Monitoring Job Status:
ENQUIRY
The ENQUIRY facility allows you to acquire the last 22 lines written to the OUT file of
a TACL process; it provides the same functionality as the NetBatch-Plus ENQUIRY
screen. To access this information, you open the TACL process and send it an enquiry
message (-22). TACL replies with the lines of text from its OUT buffer.
Note
To limit open access to a TACL process, use the #TACLSECURITY built-in function.
The following considerations apply:
If a line in the buffer is less than 80 bytes long, TACL does not pad the remaining
bytes. The byte length of the line can be used to determine the amount of valid
information on the line.
If a line in the buffer was greater than 80 bytes, TACL truncates the text to 80
bytes but records the actual length in the buffer.
TACL writes a copy of all OUT data to the buffer; it does not perform any filtering
or checking of the content of the data, except that it does not copy blank lines to
the buffer.
TACL initializes the buffer to nulls. If you detect a null line length, the remaining
part of the buffer is empty. You can use this information to determine where in
the buffer to start reading. On the initial read, if the next line field has a zero
length, you must begin reading at line 0.
Use the routine in Figure 5-14,
enquiry
, to access the ENQUIRY feature of TACL.
The
enquiry
routine acquires the last 22 lines that a TACL process has written to its
primary OUT file. The routine performs the following steps:
1.
Opens the TACL process specified by the
process_name
variable.
2.
Sends the TACL process an enquiry message (message code of -22).
3.
Receives a reply buffer (
logring
) containing the last 22 output lines.
4.
Displays the buffer as follows:
If the
logring
buffer is full (typical situation):
a.
Start reading
logring
at the line number specified by the
next
element of
the
logring
STRUCT. When the line
last_line
is read, start reading at
line 0 and terminate after reading the line
next
- 1.
b. As each line is read, display the number of characters specified in the length
element of the
logring
STRUCT.
c.
If the length exceeds
max_chars
, truncate the line to the length of
max_chars
.
If
logring:next
points to a line with zero length, the buffer is only partially full.
Start reading
logring
at line 0 and terminate after reading line
logring:next
-1.