GDSX Manual

Service Routines
Extended General Device Support (GDSX) Manual134303
8-26
^FILE_OPEN_
^FILE_OPEN_
By calling the ^FILE_OPEN_ procedure, one task can establish a communication path
between all user tasks and a file. ^FILE_OPEN_ may be called whether USCODE is
converted or unconverted.
Except for the following considerations, the syntax, condition code settings, and
considerations regarding this procedure are the same as given for the Guardian
FILE_OPEN_ procedure in the Guardian Procedure Calls Reference Manual.
Considerations
Calling ^FILE_OPEN_ in a nowaited mode causes the calling task to be suspended.
Because the working stack images of tasks are swapped to and from an extended
data segment during I/O operations, I/O must be performed to and from global
buffers.
If the options parameter is supplied and bit 1 is set for a nowaited call, USCODE
should not issue a subsequent ^AWAITIO. TSCODE will take care of issuing an
AWAITIO to Guardian to return the information to the calling task. No additional
user code is necessary to complete the call.
^OPEN does not support process file segment (PFS) buffering, while
^FILE_OPEN_ does support PFS buffering.
The primary-processhandle parameter supported for the Guardian
FILE_OPEN_ procedure is not supported for ^FILE_OPEN_. TSCODE
automatically opens files in the backup process on behalf of USCODE.
When a user task calls ^OPEN, the resulting open may be either private to that task
or public to all tasks in the GDSX process. The distinction made by TSCODE is
based on the address of the file number parameter passed to ^OPEN: if the address
is local to the task or is in the upper 32K words of the user data segment, the open is
considered private; if the address is in user globals or the buffer pool (anywhere
below %73000), the open is considered public.
^Open is called in the primary process; hence, it is optional to provide the following
parameters:
°
primary file_id
°
primary process_id
°
primary block buffer
°
primary block length
For the purpose of editing input data, it may be desirable to read disk files within
GDSX. Because the maximum nowait depth for disk files is 1, at most one nowait
Caution. When a user task stops, TSCODE automatically closes all of the tasks private opens
but leaves public opens open, because other tasks may be using them.