Chapter 4-2: True/False Status Indicators
Statements That Affect T/F Status Indicators
There are a number of statements that affect the value of internal true/false status indicators. Of the seven functional categories of statements shown in Table 4-2-1, only the following affect these indicators:
· Two field-related statements set the next status indicator to T or F: RECEIVE (depending on whether or not there is a matching PASS statement) and VERIFY (depending on whether or not the VERIFY operation is successful).
· Two types of control statements:
· The process-type statements (CALL, INPUT, RUN, etc.) alter the flow of processing and invoke a specified process. The specified process is either invoked successfully (sets a value of T) or fails (sets a value of F)
· The GOSUB and RETURN statements store the current indicator values, clear the values for independent use within the GOSUB subroutine, and then restore the indicators to their original values for continued processing following the RETURN. In addition, when implemented, GOSUB will set the next status indicator to the value indicated in the RETURN statement, if any.
· All condition-testing statements (IF, AND, and OR) test the relationship between two values. The result is always either true or false, and the indicator is set or modified accordingly.
· Only one image-related statement sets the next status indicator to T or F: AT FIELD (depending on whether or not the cursor is positioned on the field or fields specified).
· Several file-related statements (CREATE, READ, WRITE, etc.) set a value of T if successful, or F if not.
All statements affecting T/F values are listed in alphabetical order in Table 4-2-1 below:
Statement |
Condition |
If the AND statement is evaluated as false, APPX changes the current value of the next status indicator to F; otherwise, it preserves the current value. Refer to the Using AND and OR Statements section. | |
If the cursor is positioned on the specified field or fields, APPX sets the value of the next status indicator to T, otherwise, to F. See the AT FIELD keyword for further options. | |
If the called routine is invoked successfully, APPX sets the next status indicator to T; otherwise, to F. | |
If the file creation executes successfully, APPX sets the next indicator to T; otherwise, to F. | |
When a GOSUB statement executes, APPX stores the current status indicators, then clears them to give the subroutine a clean slate for setting values as required. The indicators are restored to their original values for continued processing following the RETURN. In addition, when implemented, GOSUB will set the next status indicator to the value indicated in the RETURN statement, if any. | |
If the IF statement is evaluated as true, APPX sets the next level to T; otherwise, to F. | |
If the specified file exists, APPX sets the next level to T; otherwise, to F. | |
If the specified process completes successfully, APPX sets the value of the next status indicator to T; otherwise, to F. | |
If the specified process completes successfully, APPX sets the value of the next status indicator to T; otherwise, to F. | |
If the specified process completes successfully, APPX sets the value of the next status indicator to T; otherwise, to F. | |
If the specified process completes successfully, APPX sets the value of the next status indicator to T; otherwise, to F. | |
If the file is opened successfully, APPX sets the next level to T; otherwise, to F. An OPEN succeeds unless the file does not exist, the file was already open for exclusive use, or there is a file authorization failure. | |
If the OR statement is evaluated as true, APPX changes the current value of the next status indicator to T; otherwise, it preserves the current value. Refer to the Using AND and OR Statements section. | |
If the specified process completes successfully, APPX sets the value of the next status indicator to T; otherwise, to F. | |
If the specified process completes successfully, APPX sets the value of the next status indicator to T; otherwise, to F. | |
If the file READ operation is successful, APPX sets the next level to T; otherwise, to F. A READ is successful unless a specified record is not in the file. | |
If the READNEXT operation is successful, APPX sets the next level to T; otherwise, to F. A READNEXT is successful unless an end-of-file condition is encountered, or no record is found within the range specified by previous BEG AT and/or END AT statements. | |
If the named field is passed explicitly via a PASS statement, APPX sets the next indicator to T; otherwise, to F. | |
A RETURN statement has a special effect on true/false status indicators. You use a RETURN statement as the last step in a GOSUB routine to return control to the original point in an ILF routine where a GOSUB was invoked. When a RETURN statement executes, APPX automatically resets all five indicators to the values that existed just before the GOSUB operation was invoked. In addition, when implemented, GOSUB will set the next status indicator to the value indicated in the RETURN statement, if any. | |
If the REWRITE operation is successful, APPX sets the next level to T; otherwise, to F. A REWRITE is successful unless the record was not previously held for update, or it contains a duplicate key on a key path where duplicates are not allowed. | |
If the external program is invoked successfully, APPX sets the next status indicator to T; otherwise, to F. | |
If APPX successfully scratches (deletes) a specified file or the file does not exist, APPX sets the next level to T; otherwise, to F. | |
If the specified process completes successfully, APPX sets the value of the next status indicator to T; otherwise, to F. | |
If the specified process completes successfully, APPX sets the value of the next status indicator to T; otherwise, to F. | |
If the specified process completes successfully, APPX sets the value of the next status indicator to T; otherwise, to F. | |
If the VERIFY operation is successful, APPX sets the next status indicator to T; otherwise, to F. | |
If the record is written successfully, APPX sets the next status indicator to T; otherwise, to F. |
Table 4-2-1. Statements That Affect Internal True/False Status Indicators
APPX Application Design Manual (01/13/03)
© 2003 by APPX Software, Inc. All rights reserved