|
Sorry.... I made a wrong assumption. The programming model that I use (JDE) usually physically creates all subfile records prior to display for data entry subfiles... What I described works if you use this technique: If the subfile is going to have 400 records in it, write 400 blank records to the subfile. In this way, you can place the relative record number into an output field in the subfile. When the user presses <Enter> or a given function key, use READC or CHAIN operations to process the records in the subfile, depending on editing requirements. Then look for either non-blank values or changes made by comparison to hidden fields in the subfile to determine which records to use from the subfile. If all fields are blank or zero, ignore the subfile record. If you are initializing the subfile with 400 records, then I don't know of a way to do what you want... Steve Landess ----- Original Message ----- From: <SCarter@rsrcorp.com> To: <rpg400-l@midrange.com> Sent: Monday, November 25, 2002 5:16 PM Subject: Re: Displaying a sequence number in load all DDS? > > Steve, > A little history here is that on iinitialization the subfile control is > written then the subfile is displayed with out ever writing a subfile > record. What I am looking for is a way to make a field that automagicall > increments itself with out any intervention in the RPG. Will this method > do that? If not is this even possible? > > ____________________________________________________ > > J. Scott Carter > Programmer/Analyst > e-mail: Mailto:scarter@rsrcorp.com > Phone: 214.583.0348 > > It's not the destination that counts in life it's the journey. The journey > with the people we love is all that really matters. Such a simple truth so > easily forgotten. > > > > "Steve Landess" > <steve_landess@ho To: <rpg400-l@midrange.com> > tmail.com> cc: > Sent by: Subject: Re: Displaying a sequence number in load all DDS? > rpg400-l-admin@mi > drange.com > > > 11/25/2002 04:51 > PM > Please respond to > rpg400-l > > > > > > > Define an output field in the subfile for displaying the relative record > number. > > Then, in the RPG program: Just before you write the subfile record to the > subfile, z-add or move the value of the subfile RRN field (as defined in > the > F-spec continuation KSFILE line) into this new field. > > HTH > > Steve Landess > Austin, Texas > (512) 423-0935 > > > > > > > > > _______________________________________________ > 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. >
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.