| |
August 24, 1999 | |
Using the Redefine Command with Permanent Fields; Redefine "Type" Syntax | |
TAS 5.1, ADV 5.1 | |
Angela M. Frates (Copyright 1999 Addsum Business Software, Inc.) |
We have encountered several instances where a properly made change in the size of a permanent field (i.e. one that is a part of the data dictionary) would retain its original size when attempts were made to re-add the field name to a standard TAS screen format. We have only seen this happen when modifying an Advanced Accounting 5.1 screen (but with both alpha and numeric field types), specifically in some job cost and inventory module programs. This was despite the fact that the affected data file had been restructured, all instances of the prior use of the field had been removed from all screens used in the program, the changed file size was properly reflected when viewing the data through "maintain database" and the field would show up correctly during "test" attempts to add it to other programs.
While one workaround would be to use memory variables, the best/easiest solution that we found was to redefine the permanent variable by using the TAS command REDEF.
Example:
;assume that permanent field name BK_FIELD_NAME in file BKFILE has been changed from ;size 12 dec 4 to size 10 dec 2 but will not display its new size correctly on the screen ;define the file handle define bkfile_hndl type I size 5 ;open the file openv `BKFILE' fnum bkfile_hndl lock n ;redefine the permanent field to the same size as in the data dictionary redef BK_FIELD_NAME type 'N' size 10 dec 2 file @bkfile_hndl ofst 8
NOTE: the type value must be in single quotes, e.g. 'A','N','D','T','I','B','F','P','R','L' - this is not specified in the TAS 5.1 manual.
\homepage\techmemo\ad082499.htm