<<

Contents

Search

>>

 

OPEN

 

 

Instruction

 

 

Syntax:

OPEN = <File Type>, <File Number>, <Filename> [,<Record Length>] ON ERROR … END

 

<File Type>

INPUT | OUTPUT | EXTEND | RANDOM

<File Number>

= <NUM-EXPRESSION>

<Filename>

= <STRING-EXPRESSION>

<Record Length>

= <NUM-EXPRESSION>

 

 

Meaning:

Opens a sequential or random file.

 

Parameter:

File Type

Specifies the file type:

 

INPUT

Reading sequential input file

OUTPUT

Writing sequential input file

EXTEND

Writing sequential output file (Add behind end of file)

RANDOM

File with optional access for input/output

 

File Number

Number of the file. With all file operations the file is identified by this number.

 

Filename

Name of file

 

Record Length

Record length with RANDOM file

 

Sample:

OPEN INPUT,1,”Input.dat” ON ERROR … END

 

OPEN OUTPUT,2,”Output.dat” ON ERROR … END

 

OPEN EXTEND,3,”Extend.dat” ON ERROR … END

 

OPEN RANDOM,4,”Random.dat”,128 ON ERROR … END

FIELD 4,128 AS P$

 

 

See also:

CLOSE

INPUT

LINE INPUT

INPUT$

OUTPUT

FIELD

GET

PUT

EBUS_SEQ_OPENMODE

OUTPUT_CHARSET

INPUT_CHARSET

GET_FILECONTENT$

PROCESS_SEQ_FILE

Error numbers