6100 ADCCP Programming Manual

Application Tasks
Writing Applications that Use ADCCP
069225 Tandem Computers Incorporated 4–9
WRITE Procedure
The WRITE procedure writes data from an array in the application program to an
open file.
CALL WRITE (
filenum
!i
,
buffer
!i
,
write-count
)
!i
filenum
input
INT:value
is the number of an open file that identifies the file to be written.
buffer
input
INT:ref:*
is an array containing the information to be written to the open file specified by
filenum
.
write-count
input
INT:value
is the number of bytes to be written to the file. For key-sequenced files and
relative files, 0 is illegal. For entry-sequenced files, 0 indicates an empty record.
AWAITIO Procedure
The AWAITIO procedure is used to complete a previously initiated I/O operation.
AWAITIO is used to wait for the operation to finish or to check for completion of an
operation on:
A particular file.
Any file, or to wait for a timeout to occur.
When waiting for the operation to finish on a particular file, execution of the
application process is suspended until completion occurs. A timeout is considered to
be a completion in this case. (Refer to the System Procedure Calls Reference Manual for a
description of time limits in the AWAITIO system procedure call.)
When checking for the completion of the operation, the call to AWAITIO immediately
returns to the application process, regardless of whether there is a completion or not.
(If there is no completion, an error indication returns.)
If you perform an operation using READ, WRITE, or WRITEREAD with a file opened
nowait, you must complete the operation with a call to the AWAITIO procedure.