× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.





RE:     Re: Pros & Cons

I use  a data dictionary,  Field ref's (sometimes multiple) and define all
fields there that are used in PF's, DSPF's, PRTF's,  etc.    I use the 
REF at the top of display file,  all fields used just do a plain 'R' for 
refer.   All PF's have unique 3 letter prefix, all fields in files start
with those letters(the other seven are usually root suffixes, like Invoice 
Number-INVNO, Cust number-CUSTNO,  or something like that.  XXXINVNO, 
ZZZCUSTNO, XXXCUSTNO, etc.

I use the same fields on the display as the data base. (those are the true
entities's attribute's names) and I like looking at a display file format
and being able to to know that the fields came from and goto a certain file.
  
I chain or read to put the fields on screen,  Unlocking all held records,  
Display screen, User changes field,  edit routine,  
Optional step(If ok,  check to see if data base has changed since first 
lock, simple to do with D/S's),   Chain for update,  after accessing record,
reRead the Screen Format to refresh fields coming from display, and do 
the update.

I use  RTNDTA keyword on the DSPF format that displays the record.  
That allows me to reRead the display file format.  

The upsides are:
 
1. Display file has true entity field names.  

2. You are working with the true data base file's field names in your code.
Like in the edit routine,  You can scan for the data base field name and 
find it's edit.

3. No extra fields to move around.  Less moving parts, less likelyhood of 
mistake being made.

It produces cleaner routines,  In every program you are looking for the 
data base field names.  No transmutations. 

(This method just happens to be in the DDS manual, as an example
for the RTNDTA keyword.  I Just reread it. ha ha)

Just a thought.
John Carr
EdgeTech
Have Classes,  Will Travel


>Just something to consider.....
>If you use the same names, when you CHAIN to the file before the UPDAT
>the existing field  values from the file will overwrite the screen field
>values. You will loose the values changed on the screen. 
<SNIP>
>Ravi

Tim-Bar wrote:
 
> 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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.