6.2.26.1 General Rules
- If a file opened with the INPUT phrase is an optional file which is
not present, the OPEN statement sets the file position indicator to
indicate that an optional input file is not present.
- Execution of an OPEN INPUT or OPEN I-O statement sets the file
position indicator:
- For indexed files, to the characters with the lowest ordinal
position in the collating sequence associated with the file.
- For sequential and relative files, to 1.
- When the EXTEND phrase is specified, the OPEN statement positions the
file immediately after the last record written in the file. (The
record with the highest prime record key value (for indexed files) or
relative key value (for relative files) is considered the last
record.) Subsequent WRITE statements add records as if the file were
opened OUTPUT. The EXTEND option can be specified when a file is
being created; it can also be specified for a file that contains
records, or that has contained records that have been deleted.
- X >_OS/2_> Any OS/2 VSAM files, that specify the LOCK MODE IS AUTOMATIC
X phrase are shareable (except for any VSAM files residing on a LAN
X server). Shareable files can be opened by more than one file
X connector. If the OPEN statement fails due to locking constraints,
X the file status is set to indicate "file locked." <_OS/2_<
- >_Workstation_> When the EXTEND phrase is not specified, OPEN
statement positions the file at its beginning. <_Workstation_<
- >_Host_> For OS/390 VSAM files, if no records exist in the file, the
file position indicator is set so that the first Format 1 READ
statement executed results in an AT END condition.
- When NO REWIND is specified, the OPEN statement execution does not
reposition the file; prior to OPEN statement execution, the file must
be positioned at its beginning. When the NO REWIND phrase is
specified (or when both the NO REWIND and REVERSE phrases are
omitted), file positioning is specified with the LABEL parameter of
the DD statement under OS/390 and with the "label processing" operand
under CMS.
- When REVERSED is specified, OPEN statement execution positions the
QSAM file at its end. Subsequent READ statements make the data
records available in reversed order, starting with the last record.
When OPEN REVERSED is specified, the record format must be fixed.
- When the REVERSED, NO REWIND, or EXTEND phrases are not specified,
OPEN statement execution positions the file at its beginning.
<_Host_<
X >_Host_> If the PASSWORD clause is specified in the FILE-CONTROL entry,
X the password data item must contain the valid password before the OPEN
X statement is executed. If the valid password is not present, the OPEN
X statement execution is unsuccessful. <_Host_<
© Copyright IBM Corp. 1991, 1998
IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.
Return to library:
z/OS |
z/OS.e |
TPF |
z/VSE |
z/VM |
IBM Hardware |
IBM System z Redbooks
Glossary:
IBM terminology
Publications:
How to order publications
Readers:
Download IBM Library Reader |
Download IBM Softcopy Reader |
Download Adobe® Acrobat® Reader®
Library management:
Download IBM Softcopy Librarian
Contacts:
Contact z/OS
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks
of Adobe Systems incorporated.