EasyManuals Logo
Home>IBM>Laptop>5100

IBM 5100 Basic Reference Manual

IBM 5100
187 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #90 background imageLoading...
Page #90 background image
OPEN file
ref/dev-address'
[,file-numl
[,{
'user
ID'll
{IN
}
char-var
f.J'
OUT
86
OPEN
The OPEN statement allows you to:
• Identify an
attached
device with a file reference code.
• Allocate space for
the
file.
• Specify
the
file number.
• Specify
the
identification
to
be used with
the
file.
• Specify
the
file usage (input
or
output).
The syntax
of
the
OPEN
statement
is
as
shown:
. . [
{'user
10')'1
{I
N }
OPEN file ref ,'dev-address' [,flle-numl , char-var
fJ'
OUT
where:
file
ref
is
FLO
to
FL9
to
specify
the
logical file
to
be associated with
the
physical
file identified
by
the
remaining entries
in
the
OPEN statement. This file specifi-
cation can also be referenced
in
GET, PUT, RESET, CLOSE, PRINT, PRINT
USING, MAT PRINT, MAT PUT,
MAT
GET, and MAT PRINT USING
statements.
'de v-address'
is
the
address of
the
device referenced by
the
file reference code.
Valid addresses are:
'E80'
for
the
built-in tape unit,
'E40'
for
the
auxiliary
tape
unit, and
'500'
for
the
printer.
file-num
is
a
constant
or
numeric variable.
The
value of
the
file number
is
then
used
to
access
the
corresponding file on
the
device specified. Decimal values for
variables are
truncated
to
an integer. See Negative File Numbers.
char-var
is
a character variable
or
character constant enclosed
in
single
quotation
marks. The first 17 characters provide
the
identification field in
the
header
record
of
a file being opened for
output.
If you open a file for input, and specify
a character variable for identification,
the
user
10
from
the
file
is
placed in
the
character variable when OPEN
is
executed.
IN
or
OUT
indicates whether
the
file
is
to
be used for input (IN) or
output
(OUT).
A sample OPEN
statement
is
as
shown:
OPEN FL1,
'E80',
3,
IN
In
this example, file reference code F L 1 will be assigned
to
reference file 3
on
the
built-in tape unit for input.
,/

Table of Contents

Other manuals for IBM 5100

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM 5100 and is the answer not in the manual?

IBM 5100 Specifications

General IconGeneral
BrandIBM
Model5100
CategoryLaptop
LanguageEnglish

Related product manuals