CREATE [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
CREATE
The CREATE statement creates a BASIC DATA, binary, or ASCII data file.
Syntax
CREATE [file_type] fname [,RECSIZE [=] num_expr1]
[,FILESIZE [=] num_expr2] [,STATUS [=] num_var]
Parameters
file_type The value of file_type can be either the keyword ASCII
or binary. Specifying either keyword results in the
creation of a file of the corresponding type. If no
file_type is specified, then a BASIC DATA file is
created.
fname String literal or string expression containing the name
of the file.
RECSIZE These clauses can be in any order.
FILESIZE STATUS
num_expr1 Record length. If positive, each record has r words.
If r is negative, each record has r bytes. If not
specified, and file is type BASIC DATA, each record has
256 bytes (128 words).
num_expr2 File size; maximum number of records in file. Cannot
change after the file is created. The default is
established by the operating system.
num_var If the CREATE statement successfully creates the file,
it sets this variable to zero; otherwise, it sets it to
a nonzero value.
Examples
The following examples show the use of the CREATE statement.
10 CREATE ASCII "File1",RECSIZE=-100,FILESIZE=1000,STATUS=File1stat
20 CREATE "File2.mktg",FILESIZE=2500
30 CREATE "File3.lab.hp",RECSIZE 300,FILESIZE 5000,STATUS=Created
40 CREATE ASCII "File4",STATUS=Success
50 CREATE BINARY Binfile
60 CREATE BINARY File5,RECSIZE=-80,FILESIZE=5000,STATUS=Created
MPE/iX 5.0 Documentation