On 16 Oct 2008 14:06:57 -0700, [EMAIL PROTECTED] wrote:

>I wonder - Why is it not possible to add records to the beginning of a 
>data set?  Wouldn't it be possible for a sufficiently clever program to 
>place the inserted records into a newly allocated area on disk, and then 
>modify the VTOC to point to that new area first and the old first area 
>next?  It might require rewriting a bunch of control blocks, and probably 
>wouldn't work for some kinds of data sets (FBS comes to mind), but isn't 
>it theoretically possible? 

That's why we have linked lists, for occasions where this kind of
overhead is worth while.

I've used relative files for the same kind of need, although these
days databases have taken over (which do all that and more).

There are trade-offs though.   That kind of processing requires
significant overhead that slows down processing and is less reliable.
It's easier and safer to write a new copy of the file with the
inserted records in it.

----------------------------------------------------------------------
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