Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

7.13.1 CHECK_FOR Parameters

IN_FILE

IO_ERROR

IO_STATUS

ISSUE_MSG

NOT_FOUND

VAL_ERROR

WITH_KEY


Anchor
IN_FILE
IN_FILE
IN_FILE

Refer to Specifying File Names in I/O Commands.

Anchor
WITH_KEY
WITH_KEY
WITH_KEY

Refer to Specifying File Key Lists in I/O Commands.

Anchor
IO_STATUS
IO_STATUS
IO_STATUS

Specifies the name of a field that is to receive the "return code" that results from the I/O operation.

...

For the values, refer to I/O Return Codes.

Anchor
IO_ERROR
IO_ERROR
IO_ERROR

Specifies what action is to be taken if an I/O error occurs when the command is executed.

...

If none of the previous values are used you must nominate a valid command label to which control should be passed.

Anchor
VAL_ERROR
VAL_ERROR
VAL_ERROR

Specifies the action to be taken if a validation error was detected by the command.A validation error occurs when information that is to be added, updated or deleted from the file does not pass the FILE or DICTIONARY level validation checks associated with fields in the file.

...

Info
The *LASTDIS is valid even if there is no "last display" (such as in batch functions). In this case the function will abort with the appropriate error message(s).

When using *LASTDIS the "Last Display" must be at the same level as the database command (INSERT, UPDATE, DELETE, FETCH and SELECT).  If they are at different levels e.g. the database command is specified in a SUBROUTINE, but the "Last Display" is a caller routine or the mainline, the function will abort with the appropriate error message(s).

The same does NOT apply to the use of event routines and method routines in Visual LANSA. In these cases, control will be returned to the calling routine. The fields will display in error with messages returned to the first status bar encountered in the parent chain of forms, or if none exist, the first form with a status bar encountered in the execution stack (for example, a reusable part that inherits from PRIM_OBJT).

Anchor
NOT_FOUND
NOT_FOUND
NOT_FOUND

Specifies what is to happen if no record is found in the file that has a key matching the key nominated in the WITH_KEY parameter.*NEXT indicates that control should be passed to the next command.

...

If none of the previous values are used you must nominate a valid command label to which control should be passed.

Anchor
ISSUE_MSG
ISSUE_MSG
ISSUE_MSG

Specifies whether a "not found" message is to be automatically issued or not.

...