So far as I know BSAM UPDAT is the right approach but you're going to need
two paths in your program, one for "update a record in the middle" and one
for "extend."

You're going to have to do your own blocking in any event; that is, have
logic to read a block, change one record, and write the whole block back.

**Some** of the "inconsistencies" of BSAM versus QSAM versus VSAM have been
papered over, I believe, by LE. You might look into whether LE has the logic
to do this with a single path in your application.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Thomas David Rivers
Sent: Tuesday, August 22, 2006 2:22 PM
To: [email protected]
Subject: Generically update/extend a pre-existing file?


I've got a vexing problem that could probably use the collected
wisdom assembled here :-)

I want to open a sequential (non-PDS/PDSE, non-HFS) fixed block
file for output, POINT to a particular TTR and write a record
without truncating the file.  This is all BSAM I/O.

The documentation is very clear that opening for OUTPUT,
and POINTING truncates the file - but that means I loose data.

Opening the file for UPDAT would seem like a reasonable thing
to do, but I may be extending the file, or altering blocks/records
in-the-middle.  So, that probably won't work either.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to