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? 


--
Jack Hamilton
Management Information & Analysis - Analytic Information Services
Kaiser Foundation Health Plan, Inc.
1950 Franklin Street, Oakland, California 94612
+1 510 987-1556 (KP tieline 8-427-1556)

NOTE:  This email document and attachments are covered by CA Evidence Code 
§1157 and CA Health and Safety Code §1370.

NOTICE TO RECIPIENT:  If you are not the intended recipient of this 
e-mail, you are prohibited from sharing, copying, or otherwise using or 
disclosing its contents.  If you have received this e-mail in error, 
please notify the sender immediately by reply e-mail and permanently 
delete this e-mail and any attachments without reading, forwarding or 
saving them.  Thank you.


IBM Mainframe Discussion List <[email protected]> wrote on 10/16/2008 
12:24:56 PM:

> On Thu, 16 Oct 2008 13:53:47 +0200, Hunkeler Peter (KIUK 3)
> <[EMAIL PROTECTED]> wrote:

> >>I have a requirement to insert some records in the beginning of a file
> >>where already some lines are existing . i tried using DISKW using
> MOD,
> >>but they are appending to the end. How do we insert in the
> beginning?
> >>I am using REXX for this program.
> >
> >There is no direct way to insert data into a sequential data set,
> >neither
> >at the beginning nor inbetween. You need to re-write the dataset with
> >all
> >the new and current records in the desired sequence.
> >...

> Peter came close to saying this, but I think it's worth highlighting.
> This "restriction" has nothing to do with REXX; it's just  the way
> processing of sequential datasets works.

> Regarding MOD, last I checked there was no MOD option to EXECIO
> (and I wouldn't expect it there) so I assume the origonal poster
> was refering to DISP=MOD or MOD on a TSO ALLOCATE command.
> In those contexts MOD implies "Add to the end of a dataset".

> In the JCL manual it clearly states that MOD implies either
> The data set exists and records are to be added to the end of it.
> The data set must be sequential.
> or
> A new data set is to be created.
> 
> HELP for the ALLOCATE command is a lot less clear:
> ADDITIONS ARE TO BE MADE TO DATA SET
> 
> Pat O'Keefe

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

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