Envoy Application Programming Manual

Table Of Contents
File-System Procedures
Envoy Application Programming Manual427159-001
C-4
Errors
Errors
An error number is associated with each file-system procedure call. The number can be
obtained by calling the FILEINFO procedure.
External Declarations for File-System Procedures
Like all other procedures in an application program, the file-system procedures must be
declared before being called. These procedures are declared as residing outside the
application program. The external declarations for these procedures are provided in a
system file named $SYSTEM.SYSTEM.EXTDECS. A SOURCE compiler command
specifying this file should be included in the source program following the global
declarations but preceding the first call to one of these procedures:
global declarations
?SOURCE $SYSTEM.SYSTEM.EXTDECS (procedure name 1, ...,&
procedure N )
procedure declarations
Each external procedure referenced in the program should be specified in the SOURCE
command. The following example only compiles the external declarations for the
OPEN, CONTROL, READ, WRITE, and CLOSE procedures:
?SOURCE $SYSTEM.SYSTEM.EXTDECS(OPEN,CONTROL,READ,WRITE,CLOSE)
AWAITIO[X]
If a communications line is opened for nowait I/O, each READ[X], WRITE[X],
WRITEREAD[X], CONTROL, and SETMODENOWAIT call must be logically
completed by a corresponding call to the AWAITIO[X] procedure. Use AWAITIOX with
the extended 32-bit (or ‘X’) versions of the I/O procedures: READX, WRITEX, and
WRITEREADX. Use AWAITIO with the 16-bit versions of the READ, WRITE,
WRITEREAD procedures.
The form of the AWAITIO procedure is:
filenum input,output
INT:ref:1 (Use with AWAITIO)
INT .EXT:ref:1 (Use with AWAITIOX)
is the number of an open file if the AWAITIO[X] call is to apply to a particular file.
If the AWAITIO[X] call is to apply to any file that your application process
CALL AWAITIO[X] ( filenum ! i,o
, [ buffer-address ] ! o
, [ count-transferred ] ! o
, [ tag ] ! o
, [ time-limit ] ! i
, [ segment-id ] ); ! o (AWAITIOX
! only)