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