FNOM

NAME

fnom - Makes the connection with an external file name

USAGE

ier = fnom(iun, fname, type, recl) (FORTRAN)
ier = c_fnom(iun, fname, type, recl) (C)

DESCRIPTION

Establish the connection between an external file name and a FORTRAN unit number to enable proper file opening. All files connected with fnom must be disconnected with fclos before the end of the program. Upon successful completion, fnom returns a value of 0. Upon failure a negative number will be returned.
(click the here for an example of use).

ARGUMENTS

iun

FORTRAN unit number to be associated with the file.

fname

Character string giving the external file name. If the file name contains the special character @ then it refers to a CMCARC file. The first part of the name (up to the @ character) is then recognized to be the actual file name and the second part of the name (after the @ character) refers to the sub-file name within the CMCARC file.

If the file name ends with ":" (column) and the type argument contains the attribute "remote" then the file is perceived to be remote and to reside on another computer. The remote attribute works only with "word adressable" (waread, wawrit) type of file as the RPN standard file and BURP files are.  It then instructs the package to perform I/O with the use of UNIX sockets instead of conventional NFS.  This feature could be useful for files that are not accessible via NFS.

type

Character string giving information on the file type. Two or many type attributes can be combined using a comma or a plus sign as the attributes separator. (see the example).

recl

Record length in words when type is D77. When type is not D77 recl should be 0.

AUTHOR

Mario Lépine - RPN
NOTES
One can combine type attributes as shown below
              +--------STREAM-------+
              |                     |
              +---------RND---------+
              |                     |
              +--FTN--+  +--FMT--+  |
              |       |  |       |  |
              +--D77--+--+-------+--+                 +--APPEND--+
              |                     |                 |          |
              |          +--RND--+  |  +----OLD----+  +---R/W----+
              |          |       |  |  |           |  |          |
           >--+---STD----+--SEQ--+--+--+-----------+--+---R/O----+--+----->
                         |       |     |                            |
                         +--FTN--+     +--SCRATCH-------------------+

SEE ALSO

( fclos)