ADELIA |
VADELIA |
SADELIA |
WADELIA |
EADELIA |
(I/B) |
(I/B) (C/S) |
(B) (S) |
(I/B) (C/S) |
(B) (C/S) |
Section for use
All
Syntax
IF ViewName DOES_NOT_EXIST
Description
This instruction is a logical operator which can only appear in a condition. It tests whether a file access was successful.
A reading or positioning instruction must have been executed prior to the test.
The variable ViewName placed beforehand must be the guide word of a view declared at the prototype level.
Example
* Controls the ITEM file
*
CHAIN ITEM_VW
IF ITEM_VW EXISTS AND MODE = 'CREATE'
PREPARE_MSG 0057 Z_ITEM_CODE
* already exists
INIT_MSG Z_ITEM_CODE MODE
ANOMALY
END
*
IF ITEM_VW DOES_NOT_EXIST AND MODE = 'UPDATE'
PREPARE_MSG 0055 Z_ITEM_CODE
* record does not exist
INIT_MSG Z_ITEM_CODE MODE
ANOMALY
END