next up previous contents index
Next: General utility routines Up: The ZEBRA and Previous: The ZEBRA and

Server Routines to perform remote I/O

Open remote file

CALL SZOPEN (LUN,FILE,LRECL,CHOPT,IRC)

LUN
Integer variable specifying logical unit to be used.
FILE
Character variable specifying the file name.
LRECL
Integer variable specifying the record length in bytes.
CHOPT
Character variable to specify the options desired.
IRC
Integer variable in which the return code is returned.

This routine opens a file on the server node.

CHOPT: 'D' - Open the file for direct access
CHOPT: 'F' - Open the file 'FORMATTED' (default=unformatted)
CHOPT: 'N' - Open the file with STATUS='NEW'

Close remote file

CALL SZCLOS (LUN,CHOPT,IRC)

LUN
Integer variable specifying logical unit to be used.
CHOPT
Character variable to specify the options desired.
IRC
Integer variable in which the return code is returned.

This routine closes a remote file previously opened by SZOPEN.

CHOPT: 'D' - Delete remote file

Read record from remote file

CALL SZREAD (LUN,IBUFF,NREC,NWANT,NGOT,CHOPT,IRC)

LUN
Integer variable specifying logical unit to be used.
IBUFF
Array to receive the data.
NREC
Integer variable specifying the record number to read (for direct access files only).
NWANT
Integer variable specifying the number of bytes to read (for files with variable length records NWANT specifies the maximum number of bytes that can be accepted).
NGOT
Integer variable specifying the number of bytes read for files with variable length records.
CHOPT
Character variable to specify the options desired.
IRC
Integer variable in which the return code is returned.

This routine reads a record from a remote file previously opened by SZOPEN.

Write record to remote file

CALL SZRITE (LUN,IBUFF,NREC,NWRITE,CHOPT,IRC)

LUN
Integer variable specifying logical unit to be used.
IBUFF
Array to containing the data to be written.
NREC
Integer variable specifying the record number to write (for direct access files only).
NWRITE
Integer variable specifying the number of bytes to write. for files with variable length records.
CHOPT
Character variable to specify the options desired.
IRC
Integer variable in which the return code is returned.

This routine writes a record from a remote file previously opened by SZOPEN.

Rewind remote file

CALL SZREWD (LUN,CHOPT,IRC)

LUN
Integer variable specifying logical unit to be used.
CHOPT
Character variable to specify the options desired.
IRC
Integer variable in which the return code is returned.

This routine rewinds a remote file previously opened by SZOPEN.

Inquire if remote file exists

CALL SZINQR (LUN,CHOPT,IRC)

LUN
Integer variable specifying logical unit to be used.
FILE
Character variable specifying the remote file name.
NODE
Character variable specifying the remote node name.
IEXIST
Integer variable in which the remote file status is returned.
LRECL
Integer variable in which the record length of the remote file status is returned.
IRC
Integer variable in which the return code is returned.

This routine checks whether a remote file exists or is OPENed.



next up previous contents index
Next: General utility routines Up: The ZEBRA and Previous: The ZEBRA and


Janne Saarela
Tue May 16 09:22:05 METDST 1995