Navigation:  Reference > Commands >

Redefine Field

Print this Topic Previous pageReturn to chapter overviewNext page

 

This command is used to change a field that has been previously defined.  This field may be a part of a standard TAS Professional file.  However, the changes will only apply during the execution of the program.

 

REDEF fn/v Required - The name of the field being redefined.  Must be a standard TAS Professional field name.

 

TYPE f/c/eThe new field type.  If you don't specify a field type, the program will use the current value.  The field name types are listed here.

 

SIZE f/c/e The new display size.  If the type is A then this is required and is both the display and internal size.

 

DEC f/c/e If the type is N then you can also define the number of decimal characters.  The maximum number is 8 and must be at least 2 less than the size value.

 

FILE fn/v If the field being redefined is part of a TAS Professional file then this is the number/handle for that file.  The file must be opened before a field can be redefined.

 

OFST f/c/e If the field being redefined is part of a TAS Professional file then you can specify the new offset within the file buffer.

 

       NOTE:  In almost every other instance in TAS Professional the first number will always be 1.  However, in this case the first character of the record is number 0.

 

UP f/c/e This value must resolve to Y or N.  If the value is Y, then any entries made to this field will be forced to upper case characters.

 

LOC fn/vIf you specify a fieldname here, the program will use the location (offset) of that field for this one.

 

COMMENTS

The original size (internal) of the field being redefined must be large enough to cover the internal size of the new field.  The program does not check that this is true, and you can end up crossing from one field to another or otherwise destroying your memory space.  This is VERY important and could produce AV errors if not caught.

 

You should consider using the ADD command before using this one.  It is much more flexible and doesn't have the restrictions on original size.

 

 

SEE ALSO                        

DEFINE

 

 


Page url: http://www.cassoftware.com/tas/manual/redefine.htm