|
Hello Darlene, If programming in RPG then I am of the view that separate fields are better (and not just in the DSPF) for many of the reasons outlined by other appenders (all of which can be summed up by the phrase 'data isolation') even though I'd prefer a single name for each data entity. However, I would like to point out that this is really only an issue with RPG. Most other HLLs use separate structures for the various fields in the files and the programmer needs to qualify the field references. RPG allows only one instance of a given name and that is what causes the problem of overlayed data. Note that all field REFerences should be to a single data entity within the field reference file -- never reference the actual PF or LF (or PRTF or DSPF for that matter -- unless by *SRC). If you always code RTNDTA in the display file DDS you can use the same entity name but it does add extra code (1 line) that is only required because of RPG and doesn't help when the same entity name appears in multiple PF, LF, or PRTF files. I'd rather change the name of the field in the DDS (see an earlier append of mine regarding field reference files). Now if only RPG supported a MOVE CORRESPONDING construct and qualified field names this issue would go away. Regards, Simon Coulter. //---------------------------------------------------------- // FlyByNight Software AS/400 Technical Specialists // Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 // Fax: +61 3 9419 0175 E-mail: shc@flybynight.com.au // // Windoze should not be open at Warp speed. //--- forwarded letter ------------------------------------------------------- > X-Mailer: Mozilla 3.01C-KIT (Win16; U) > Date: Mon, 26 Oct 98 16:42:02 -0800 > From: "Tim-Bar" <timbar@blazenet.net> > To: midrange-l@midrange.com > Reply-To: MIDRANGE-L@midrange.com > Subject: Pros & Cons > > Here's one to toss around - > > When creating a display file for a file maintenance program, is it > better to reference the physical file fields or create fields with > different names? If you use different screen field names you have to > move the file fields into those fields to display on the screen and then > move the screen fields back into the file fields before updating the > record format. This seems like a lot of extra work. Is there any reason > to do it this way? > > TIA > > Darlene Brengle > Norsoft, Inc. +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.