Hi,
Open extend means you are adding more data to a sequential file. It implies that the file already exists. You cannot delete or rewrite records in this mode, only write.
Just a picky addendum to the discussion: If you're using OPEN EXTEND with a VSAM (or indexed?) file, make sure the key values are greater (or less for descending sequence) than the last key value in the file and they are in sequence.
Jack
P.S. Not being a non-mainframe maven, I "?" the indexed file reference.
Marion(once Pgmer)
I've the impression Jack doesn't know what is indexing.
A VSAM file is a Record organized file and each record has a key (index) designating it position in the file.
Open extend means that a disk file will be extended by the program.When a file is extended, records are added to the file after the last record in the file.
According to the ANS standards, a file opend in extend mode can't be created by teh program; the file must already exist (...a nulfile works....) so records can be added to it. The exception (there's always an exeption) is an optional file. But.. who uses optional files??
A VSAM sequential fil can be either created or extended when the file is opened in extend mode. But there's no need for an indexed file extended, because of the index.
I knew I shouldn't have mentioned PC indexed files in my post!
My suspicion was that some non-mainframe indexed file implementations might have VSAM-like capabilities, specifically, sequential, random and dynamic access modes. The dynamic mode provides both sequential and random modes in the same program.
Sticking to the mainframe, IBM OS390, et al, permits extending tape files; doesn’t even require the special extend OPEN option to take advantage of the capability on disk and tape. Users can use the MOD option in the DISP JCL parameter and optionally extend or create a new file if it doesn‘t already exist.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.