|
Here is my definition of a reference file. Reference files are a way of defining fields in a file, like the type, and length. You are probably used to flat files, where the fields were defined in the program that used that file. In external described files, you create PF DDS specs for the physical files, which lists the fields used in the file. Instead of listing the type and the length of field in the physical file DDS, you can create a reference file and have the physical file reference the field in the reference file. (Really good for common fields in files) Example Reference File A R FREFFIL A NAME 30A Physical File A REF(REFFIL) A R FRECFMT A NAME R Then when you compile the reference file and the physical file. The physical file field "NAME" will retrieve the length and type from the reference file. This way the field attributes stay consistent between files. Richard > -----Original Message----- > From: Sherry McMahon [SMTP:smcm@frontiernet.net] > Sent: Monday, January 03, 2000 5:28 AM > To: RPG400-L@midrange.com > Subject: Reference files > > Hello everyone, > > Thank you for the help with the OMIT option in the SAVLIB command. It > helped me greatly and prompted me to order the 'CL Programming for the > IBM' > book. > > I have another situation I've been wondering about and haven't felt > comfortable with the answers I've gotten when I've asked programmers I > work > with. I've rewritten Sys36 programs in RPGIV and converted flat files to > 400 physical files. (Once again Scott, thank you thank you thank you for > your help) As I was doing this I saw other files, already AS/400 PF, had > reference files. Everything I could read about reference files told me > they > were just PFs. I didn't understand why there were reference files then > physical files then logical files. In my conversions (Y2K) I did away > with > the reference files and made the system consistent with just having the > data > in the physical files. Originally some of the data was in physical files > and some in the reference files. All anyone could tell me was this was > the > SYS36 way and the people before me stayed with what they knew. The fact > that I don't understand why these files were necessary makes me afraid I > may > have done some harm by doing away with the reference files, although > everything is working fine. As usual the books and online references > aren't > clear to me. Could someone give me some insight into this? > > Thank you, > Sherry McMahon > > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: > david@midrange.com > +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.