[BR_forum] Index Files and "V" fields
Posted: Sun May 24, 2009 8:38 am
Hi all,
I have a "member" data file where the name and address are currently stored all in upper case in "C" fields. The name field is C 25 and names are entered in "LastName, FirstName MI" format.
I plan to separate these name components into individual fields AND make them mixed case instead of forcing upper case. I'm also going to mix the case of the address fields. I was going to use "V" fields to automatically trim the trailing spaces. Currently, they are all "C" fields, as I mentioned.
The issue is keyed file access. One of the secondary keys is Name/MemberNo. So the new key would have to be LastName/FirstName/MI/MemberNo. With V fields, am I correct in assuming that the components of the key would NOT automatically be padded out (by BR) with trailing spaces when the key is created? So in other words, my key would be junk because the "columns" wouldn't line up in the key?
In my case, would the better choice be to continue to use "C" fields for any components that might ultimately become part of a key? Or should I create an additional key field inside the record (invisible to the user) that is LastName/FirstName/MI/MemberNo with the padding of the individual components?
What is the appropriate use of "V" fields? I have NEVER used them in the past, always defaulting to "C" for character fields. I'm rewriting a lot of my application and this is the time for these types of changes if they make sense.
-- Susan
I have a "member" data file where the name and address are currently stored all in upper case in "C" fields. The name field is C 25 and names are entered in "LastName, FirstName MI" format.
I plan to separate these name components into individual fields AND make them mixed case instead of forcing upper case. I'm also going to mix the case of the address fields. I was going to use "V" fields to automatically trim the trailing spaces. Currently, they are all "C" fields, as I mentioned.
The issue is keyed file access. One of the secondary keys is Name/MemberNo. So the new key would have to be LastName/FirstName/MI/MemberNo. With V fields, am I correct in assuming that the components of the key would NOT automatically be padded out (by BR) with trailing spaces when the key is created? So in other words, my key would be junk because the "columns" wouldn't line up in the key?
In my case, would the better choice be to continue to use "C" fields for any components that might ultimately become part of a key? Or should I create an additional key field inside the record (invisible to the user) that is LastName/FirstName/MI/MemberNo with the padding of the individual components?
What is the appropriate use of "V" fields? I have NEVER used them in the past, always defaulting to "C" for character fields. I'm rewriting a lot of my application and this is the time for these types of changes if they make sense.
-- Susan