Using NS3000/iX Network Services (36920-90008)

Chapter 3 53
Remote File Access
RFA Programmatic Access
RFA Programmatic Access
Once an environment has been established on the remote node, a local
application program can access remote files by calling standard MPE/iX
file system intrinsics (or by using the input/output procedures specific
to the language in which the program is written). If a FILE command
specifying a formal designator for a remote file or device has been
issued, an FOPEN call in the local program can use this formal
designator in its formaldesignator parameter. For example:
:FILE X=X:NODEB
.
.
>
FOPNE (X,...);
A language-specific I/O procedure can also reference the file by means
of this formaldesignator.
In Pascal, the file name used in the program can include the nodespec as
follows:
OPEN (X, ‘X:NODEB’);
In the Pascal example, the file equation is not needed. Most
language-specific file open statements do not permit a nodespec and
must use a preceding FILE command.
If a FILE command has not been issued for the remote file, you must
specify the location of the file in the FOPEN call, either in the
formaldesignator parameter or in the device parameter (not both).
(Currently, only in Pascal can you use the extended formal designator,
with location, in a non-intrinsic I/O procedure.) These are the two
possibilities:
formaldesignator: file[/lockword][.group[.account]][:nodespec],
where nodespec is an environment ID or $BACK, as defined for a FILE
command;
device: [envname]#[device], where envname is an 8-character (or
shorter) string as defined for a FILE command.
For example:
FOPEN (X.NODEB,...)
or
FOPEN (X,...,NODEB#,...);
You can also use a file equation to override the location indicated in
your program (FILE command parameters override FOPEN
parameters). For example, the following sequence opens a file on
NODEC: