|
Mike ... and also Mike :) surely a simple RPG would also mean there would be no RRN 1 until a re-org :) I agree if there are lots of records this could be time consuming.... An RPG pgm has attractions especially if there are logical files built over the physical involved. If CL is the preferred methodology and logical files are not an issue do a RNMOBJ first, followed by a CPYF with CRTF(*YES) specified - this will save almost half the copy time. Otherwise copy out to a new file and copy back from record 2 (as suggested elsewhere). Make sure the copy out to the new file also specifies to start from record 1 as this will copy sequentially and will probably be quicker. You may wish to consider utilising blocking factors to optimise the copy operations if time is at a premium and you have a lot of data and simply have to use CL. If you have lots of data/files remember to watch your disk space as you will roughly double the amount of storage used if you don't delete the copies. If this is a multi-member file be aware of the 32, 768 member limit... Sounds a bit like dealing with CSV files with header lines to me.... Regards Evan Harris
This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] Assuming there is a record number 1 that would work, but might take a long time if the file had thousands of records, also the next time you ran it, unless you had re-orged the file, there wouldn't be an RRN 1! Why not write a simple RPG program to do it?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.