Action=VALIDATE Class=DATA

This statement validates data against predefined values or edit rules.

This statement has the following format:

&CONTROL SHRVARS=(field name,$VM)
-EXEC $CACALL     OPT=ACTION
                  ACTION=VALIDATE
                  CLASS=DATA
                  PARMS='[APPL=application id]
                         FIELD=field name
                         [LIST=n]
                         [TEXT={YES | NO}]
                         [ACTIVE={YES | NO | ANY}]
                         DESC=description
                         EDITS=edit number 1,edit number 2,...
                         [IMSYS=system name]
                         [PROMPT={YES | NO}]'

Input Variables

This statement contains the following input variables:

Return Variables

This statement contains the following return variables:

Feedback Codes

If a return code of 8 is set, then additional information is available as one of the following feedback codes, set in &$CAFDBK:

Example

The following statements validate the &PCODE field against edit numbers 2 (unsigned integer) and 9 (range). The value of &PCODE must be an unsigned integer in the range 1 through 10. In the example, because &PCODE has a value of 12, an error message is returned in &SYSMSG.

&PCODE = 12
&DESC = &STR Priority Code
&CONTROL SHRVARS=(PCODE,$VM)
-EXEC $CACALL   OPT=ACTION
                ACTION=VALIDATE
                CLASS=DATA
                PARMS='APPL=$ML
                       FIELD=PCODE
                       DESC=&DESC
                       EDITS=2,9(1:10)'


Copyright © 2008 CA. All rights reserved.