Dummy fields hold data temporarily (in memory) for processing operations, display, and printing. Dummy fields (variables) can be generally categorized as either "Short" or "Long" dummy fields. The "Short" dummy field names are limited to 1 or 2 letters from A to Z and AA to ZZ. "Long" dummy field names can have a length up to 64 characters thus offering an advantage in documenting the variable usage within the name. Either category of dummy field can be used in filePro processing tables to hold any data type, the results of lookups, calculations, or data you want to temporarily store from record to record. Only "Short" dummy field names can be used for presenting/updating data on data-entry screens and printing data on reports.
Dummy fields can be used for almost every operation for which real fields can be used. Remember that these fields are "memory variables" and are not saved to disk unless the results are written to real fields.
Dummy fields are always cleared (set to null) at the beginning of processing for each record (just before the automatic table is run) unless a GLOBAL attribute is assigned.
A variable can be set up to 32127 in character length.
Defining the Short Dummy Fields
1. You bring a "Short" dummy field into existence by typing the field, with its attributes (length, edit type, global attribute) on the "Then" line of a processing table. The exact syntax is described below.
Aa(L ,T,G) |
Define the dummy field |
Aa |
name of the dummy field, 1 or 2 letters and case is not significant. Codes aa - zz can be used. Do not use a letter with a number since these are reserved for associated fields. |
L |
length of the dummy field |
T |
edit type of the dummy field (any available edit) |
G |
Optional Global attribute. Default is non-global. |
If edit type is left out, the dummy field assumes the default edit type (*), therefore:
aa(1) and aa(1,*) are equivalent.
If the global attribute is used, the same data is retained in the dummy field between records until the value is cleared or overwritten by processing.
aa(1, ,g) defines aa as a global dummy field without an edit type.
aa(1,YESNO,g) defines a global dummy field with the edit type YESNO (only allows a "Y" or "N" to be entered).
2. A dummy field can be defined on a line by itself or when first used. It doesn't matter where you define the dummy field on the processing table.
Then: aa(10,.0); bb(l2,UPLOW)
Then: x(l2,.2)="298.33"
3. Dummy fields only have to be defined once on a table. For example, if you do aa(8,allup) anywhere on the table, you can refer to that field anywhere else as aa (do not need the definition of length and edit).
4. If you define a dummy field on the automatic processing table, it can be used on output, input, and CALLed processing tables without being redefined.
5. Don't redefine dummy fields. Don't redefine fields that you've defined on the automatic table.
6. Undefined dummy fields will take on the attributes (length and edit) of fields they are assigned to, for example:
aa=12 will set aa equal to the contents of field 12 and give it that same length and edit type.
7. Undefined dummy fields set equal to a numeric calculation will be given a default length of 255, as in.
8. Undefined dummy fields set equal to a string will be assigned a length of 128.