|
Hi, Not knowing too much about your application and case, can I ask if a "file re-org" (RGZPFM) would give you what you want? File reorg with a KEYFILE. If there is no logical file available at the time, a temporary one could be built for tat task. Just a thought! Leo Booth Martin wrote: > I am about to step into again I bet. > > I am unaware of any normal technique for physically inserting a record into > a file. The only way I can imagine is to completely rewrite the original > file into another file, adding the new record at the appropriate spot in the > process. If the original file is small enough you can of course load the > whole file into an array at the beginning of the job and then close, clear, > open, and re-load the file at the end of the job. Manipulating the array > itself becomes a trivial exercise. > > So far as I am aware physical files are in fact arrival-sequence files that > may or may not have views of them in some logical ordering schema. > > -------------------------------------------- > Booth Martin > Boothm@Goddard.edu > 802-454-8315 x235 > -------------------------------------------- > -------Original Message------- > From: rpg400-l@midrange.com > Date: Monday, October 22, 2001 09:43:34 AM > To: 'rpg400-l@midrange.com' > Subject: RE: Insert a record > Yes, exactly. > -----Original Message----- > From: Booth Martin [mailto:Booth@MartinVT.com] > Sent: Monday, October 22, 2001 8:39 AM > To: rpg400-l@midrange.com > Subject: Re: Insert a record > "Insert" implies to me that you wish to place the new record in the midst of > existing records? > -------------------------------------------- > Booth Martin > Boothm@Goddard.edu > 802-454-8315 x235 > -------------------------------------------- > -------Original Message------- > From: rpg400-l@midrange.com > Date: Monday, October 22, 2001 09:21:31 AM > To: 'rpg400-l@midrange.com' > Subject: Insert a record > Is there a way to insert a record into a physical file using the relative > record number? > _______________________________________________ > _______________________________________________ > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. -- Leo Lefebvre Vice & Past President Toronto Users Group for Midrange Systems Visit our home page at <http://www.tug.ca> Ph: (416) 606-5960 --- Fx: (416) 495-0100 mailto:leo@tug.ca
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.