Enable/Disable Validation Option

PURPOSE:  The VALIDATION option controls the validation check when data is stored into a field whose description includes a VALID IF VALUE clause.  This command is valid in a CM, PM, SF and as a direct command.

SYNTAX

{ENABLE; DISABLE} VALIDATION [{IF; UNLESS} clause]

ENABLE

allows the criteria check when data is stored into a field whose description includes a VALID IF VALUE clause.  This is the default state.

DISABLE

suppresses the criteria check.

{IF; UNLESS} clause

specifies certain criteria that must be met for the ENABLE or DISABLE command to take effect.

EXAMPLE

Invalid data is input first with the VALIDATION check enabled, then it is disabled.  The field descriptions are:

*LIST SD EMP
NAME,CHAR,20
AGE,INT,2, VALID IF VALUE > 18 AND < 66
*ENTER WITH PROMPTS
NAME: KARI NYBO
AGE: 95
!!DATA VALIDATION ERROR (95) FOR AGE
AGE: 45
NAME: ***
*DISABLE VALIDATION
*ENTER WITH PROMPTS
NAME: GARY DEMILLE
AGE: 83
NAME: ***

NOTES:  This can be used to allow data from a file to be loaded into the data records and the error detected with the CHECK command and fixed with the CHANGE command or in a PM.

By default, ACCENT R will not accept input data that does not meet the condition(s) specified in a VALID IF VALUE clause of a field description.  Disabling the VALIDATION check allows data to be input that does not satisfy the VALID IF VALUE clauses contained in field descriptions.

The LIST SD command displays any VALID IF VALUE clauses associated with field descriptions.  The STRUCTURE command does not.

SEE ALSO:  LIST SD, VALID IF VALUE Clauses