Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OPEN EXTEND

Status
Not open for further replies.

jeroldqc

Programmer
Jun 18, 2001
6
0
0
PH
Can anyone help me discuss what does
EXTEND mean when OPENING file?

Thank u!
 
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.
 
Also if the file does not exist, OPEN EXTEND is logically equivalent to OPEN OUTPUT.
 
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.

Greetings,

M.

BigMag, The Netherlands.
bigmag@wanadoo.nl
 
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.

Regards, Jack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top