fiosetup_(unit, command, argument)

Purpose

The fiosetup_ function sets up the requested I/O behavior for the logical unit specified by UNIT. The request is specified by argument COMMAND. The argument ARGUMENT is an argument to the COMMAND. The Fortran include file 'fiosetup_.h' is supplied with the compiler to define symbolic constants for the fiosetup_ arguments and error return codes.

Class

Function

Argument Type and Attributes

unit
A logical unit that is currently connected to a file

INTEGER(4).

command
INTEGER(4).

IO_CMD_FLUSH_AFTER_WRITE (1). Specifies whether the buffers of the specified UNIT be flushed after every WRITE statement.

IO_CMD_FLUSH_BEFORE_READ (2). Specifies whether the buffers of the specified UNIT be flushed before every READ statement. This can be used to refresh the data currently in the buffers.

argument
INTEGER(4).

IO_ARG_FLUSH_YES (1). Causes the buffers of the specified UNIT to be flushed after every WRITE statement. This argument should be specified with the commands IO_CMD_FLUSH_AFTER_WRITE and IO_CMD_FLUSH_BEFORE_READ.

IO_ARG_FLUSH_NO (0) Instructs the I/O library to flush buffers at its own discretion. Note the units connected to certain device types must be flushed after each WRITE operation regardless of the IO_CMD_FLUSH_AFTER_WRITE setting. Such devices include terminals and pipes. This argument should be specified with the commands IO_CMD_FLUSH_AFTER_WRITE and IO_CMD_FLUSH_BEFORE_READ. This is the default setting for both commands.

Result Type and Attributes

INTEGER(4).

Result Value

On successful completion, this function returns 0. Otherwise, this function returns one of the following errors:

IO_ERR_NO_RTE (1000)
The run-time environment is not running.

IO_ERR_BAD_UNIT (1001)
The specified UNIT is not connected.

IO_ERR_BAD_CMD (1002)
Invalid command.

IO_ERR_BAD_ARG (1003)
Invalid argument.
IBM Copyright 2003