The following format is used in documenting the TAS Professional commands.
The commands are listed in alphabetical order.
The first paragraph of each command reference section is a brief definition of each command and what it does. This provides a quick insight into the command, and what you might use it for.
Next comes a list of each part for the command. Parameters and options are separated by semi-colons; refer to the explanations below for more details on typical command elements. This is not necessarily the true syntax for the command but just a listing of options with the appropriate names.
Each command part is described, along with the purpose, valid values, default value (if applicable), consequences, and whether or not the part is required.
NOTE: Only the required items are noted as such. If it isn't marked as Required then it is optional.
NOTE: There are many commands and options in 5.1 and previous that have no usage in TAS Professional programs. In those cases we have removed those commands/options from this manual to eliminate confusion. Most of those commands are still available in this version. The TAS Professional 5.1 manual is available in PDF format if you wish to go back and investigate those commands/options.
The variable portion of a command can consist of the following:
Field/Constant/Expression. You can use any type of field or constant. This can consist of alpha or numeric constants, any type of field or variable field. This can also be an expression that results in the proper type of field. Some options allow you to include multiple values, e.g.:
start_value - f/c/e1,f/c/e2,...,f/c/ex (in the RDA - read array - command)
From one to eighty values may be included. Generally, the 1024 character line length rule will be broken before the maximum number of fields can be used. In any situation where different limits apply the documentation so indicates.
When a file is opened in TAS Professional the OPENV command returns the file number or handle. You will always store that in a regular field since you don't know, before you open the file, what the value will be. When you use this value in the other file commands (EXPORT, SAVE, DEL) you will add the '@' symbol before the field name. For example, in the SAVE command, if you stored the file_num value in FILE_HANDLE the command would be:
SAVE @FILE_HANDLE NOCNF
There are other open and find commands that are previous to this version, however, using the file_num is the preferred method and is the only one documented here.
In any option, in almost any command that would normally allow a list of field names or expressions, you may use an array of F type pointers instead. In that case you would use the special modifier flist and follow it with the name of the F type pointer array field. For example, in the EXPORT command you need to specify a list of from fields. Instead of actually listing those fields you may set an array of F type pointers to point to each one and then in the command use the following:
EXPORT flist fptr_array
This will have the same effect within the program as though you had named each one of the fields individually.
NOTE: You must use an array of F type pointers only. P type pointers cannot be used. The array that you use must be at least one longer than the maximum number of elements you are going to use. To get around the problem of how to access a specific element in an array field using this process you should note that any single field--array element or not--can be added (the ADD command) to the field list in a program. All you need to do is include the array specifier in the field name and a slot will be created for that element. The command will return the fptr value appropriate for that particular element, and you can use it as you would any other fptr.
Field name/Variable field. In certain commands/options you must use the actual field name or a variable field. Some options allow multiple fields, e.g.:
TO fn/v1, fn/v2,..., fn/v3 (in the RDA - read array - command)
You may include only one field reference or up to 80. Generally, the 1024 character line length rule will be broken before the maximum number of fields can be used. In any situation where different limits apply the documentation so indicates.
You may define the key number to be used in a command in several ways:
number - The actual number of the key, as defined in the data dictionary, may be used preceded by an "at" sign (@). @3 refers to the third key in the appropriate file (the first key is 1).
key name - The name of the key as assigned in the data dictionary may be used. dict_overlay refers to the key name.
no key - If you do not want to use a key but want to access the file through the direct method then use the "no key" symbol, the number 0 preceded by an "at" sign (@). @0 tells the program to use the direct access method when searching this file. This is the default method when you have opened a non-TAS file.
This option is a line label. A line label is the only item on the line, is no more than 14 characters long and must end with a colon (:). A label is a form of a special alpha constant (sac). An example:
This label is used within a command by using the name but dropping the colon, e.g.:
If you use a label name that doesn't exist within the program the compiler will give the appropriate error message at the end of the compilation process.
NOTE: In the Program Editor you have the opportunity to receive a list of label names used within the program at the appropriate times.
An expression that will resolve to a logical value of .TRUE. or .FALSE. For example:
fld1 = 100
(fld1 = 100 .and. fld2='ABC') .o. fld3=.F.
The logical expression:
fld1=100 .or. 200
is not legal. You cannot compare to more than one value at a time. This expression should be written:
fld1=100 .o. fld1=200
Special Alpha Constant. This is an alpha constant that is not surrounded by quotes. It must start with an alphabetic character (A-Z) but may contain numbers, periods or the underline character. One form of this is a line label. Another is the name of a user defined function or user defined command. Unless otherwise stated, case is ignored and the maximum length will be stated, although 14 characters is generally the maximum.
Use this option, along with the scope_expr to limit the number of records accessed. The scope options are:
A (All) - Access all records, this is the default
F (First) - The program will find the first record in the file and then access the next xxx number of records depending on the scope_expr.
N (Next) - The program will start with the current record or if no record is active will find the next record in the file. It will then continue with the next xxx number of records depending on the scope_expr.
R (Rest) - The program will start with the current record or if no record is active will find the next record in the file. It will then continue until the end of the file.
Use this option to determine how many records to read. The options available for scope_expr are: A (all), F (first), N (next), R (rest). In the case of F and N you also specify the number of records to be read (e.g., N 100). For example, if you want to restrict a search to the first 100 records the entry for the scope_expr would be:
If the scope is set to N and a record is active the program will start with that record. If a record is not active the program will get the next record before continuing.
Special Numeric Constant. This is an integer constant. Its range depends on its use. For example, when used in the DEFINE command it may be 1 to 4gb (field size), or 0 to 8 (number of decimal characters).
Some options require UDFs (User Defined Functions) as the possible entry. What is expected and the required returns are described.
In this situation your choices are to include the option name or leave it off. The command documentation explains first the default situation (what will happen if you don't include the option), and then what will happen if you do include the option. Generally, including the option will keep something from happening. For example:
SAVE file_name/@file_num NOCNF NOCLR
In the SAVE command above, the NOCNF option tells the program not to ask the user before saving the record. The default case is to ask before saving. The NOCLR option tells the program not to clear the record buffer (and record number holder) after saving so that the information just entered into the record is still there, perhaps to be used as default values during the following operations. The default operation is for the program to clear both the record buffer and number holder after saving.
In the command documentation, these set_options are shown in italic, capital letters.
Each OPTION within the command will be described fully.
The true SYNTAX for the command is completely described. The command name and options are in BOLD CAPS. The user specified parts are in italics.
In some commands there is a special USER INTERFACE. In these situations it is described.
Special COMMENTS or restrictions are given where applicable.
SEE ALSO will list the commands/functions that are related to the command being explained.
If any EXPRESSION FUNCTIONS (not to be confused with the function of the command but a type of command that can be part of an expression) are included in the explanations they will be in bold face with parentheses at the end of the name, e.g., FUNCTION(). Even though the function may have arguments that can be included, it will be shown with no arguments within the parentheses. For more information on the function and what arguments may be used, please refer to that function's documentation.
NOTE: Spaces between multiple entries for an option are for appearance purposes only. For example: f/c/e1, f/c/e2,..., f/c/ex need not have any spaces between the commas and the preceding or following fields. However, options within a command need to be separated by at least 1 space.
EXAMPLES may also be given.
If any other command names are displayed (other than the title) within an explanation they are given in actual syntax in bold format followed by an explanatory title surrounded by parentheses, e.g.,
... in the RDA (Read Array) command ...