Bill,
Friday, January 27, 2006, 12:24:47 PM, you wrote:
BH> I've been converting dictionaries from a D3 dbms and am wondering what is
BH> considered "best practices" in virtual attribute design.
BH> Does one build standard "D"irect fields first then use these fields to build
BH> virtual attributes (I-Descriptors) or should one use the direct field
BH> references, "EXTRACT()" or "<n,n,n>", in virtual attributes?
BH> DEPOSITED
BH> 001 D The date of the deposit.
BH> 002 2
BH> VOID
BH> 001 D Is this a voided receipt?
BH> 002 12
BH> DEPDATE
BH> 001 I The displayed deposit date (if not voided).
BH> 002 IF VOID = "" THEN DEPOSITED ELSE "*Voided*"
BH> or
BH> DEPDATE
BH> 001 I The displayed deposit date (if not voided).
BH> 002 EXTRACT( @RECORD, 2, 0, 0 ) ; EXTRACT( @RECORD, 12, 0, 0 ) ;
BH> IF @2 = "" THEN @1 ELSE "*Voided*"
BH> The obvious concern is if a direct field definition is renamed, then all
BH> references to the old field name need to be changed. I rarely rename a
BH> field, until I started exposing the data to other data sources and was
BH> forced to clean up the field names. So, hopefully, this won't be an issue
BH> in the future.
I would go with using the dict names .. that is the beauty of the
dictionary . that you don't have to hardcode a position in.
And if some idiot deletes 'VOID' then they get what they deserve. It
is better documented using name and should be a 'required' practice in
a shop. AND if for some reason you want to restructure the table then
there are no worries ..
always with the right opinion .. your buddy
--
DSig `````
David Tod Sigafoos ( O O )
_______oOOo__( )__oOOo_______
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/