Batch Mode Simulation : File Operation Statements : OPEN Statement

OPEN Statement

The OPEN statement opens a file for input or output.

OPEN (file_variable, ’file_name’, INPUT | OUTPUT)

where the file_variable is assigned a file_name for purposes of input or output. For example:

OPEN (file1, ’/csw/source/sample.data’, INPUT);

The file being opened for input must already exist. If a file is opened for output, it cannot be opened again before it is closed. The interactive command Monitor SCP lists the currently opened files. The same file may not be opened for both input and output.