|
Try the following In the F-specs FFilewrk if e k disk FFile01 if e k disk prefix('L02.') then in the D-specs D L02 E DS Extname(File01) D QUALIFIED Then in the c-specs C if FieldA = L02.FieldA etc etc The fields in File01 will ALWAYS needs to be specified L02.----------- (notice the period) Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx rpg400-l-bounces@xxxxxxxxxxxx wrote on 03/07/2007 11:26:14 AM:
Tony, I have a requirement to do just what you describe. I need to read from a work file that has the same fields as a production file, except for the last field. Can you post an example of the solution ? Thanks, Richard Tony Corolla wrote :Now, if let's say that I have a file, that is JUST like the FAMLY file in the example, with the same field names and all (Let's call it DFAMLY), except for _one_ extra field in the beginning of the record format. I need to read a record from the FAMLY file, CHAIN to find the matching record in the DFAMLY file, and compare the fields (except the extra one).To accomplish this, I wanted to create a data structure that matched the record format of each file, one for FAMLY, and one for DFAMLY. Then, I wanted to make a third DS, that matched the record format of the FAMLY file, but base it on a pointer to the DS for the DFAMLY file. I assumed it would match the fields by name, as per a book Ihave read.Instead, when I read a record from the DFAMLY file into the data structure for the DFAMLY file, I check the values in the based data structure, and the fields are offset in the subfields, by three bytes (the size of the 'extra' field).Any help would be greatly appreciated.-- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx 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.