This statement builds a criteria using the criteria definition. You can supply values for the variables used in the definition. Items can be tested against the built criteria.
This statement has the following format:
&CONTROL SHRVARS=($CR,pref,...pref)
-EXEC $CACALL OPT=ACTION
ACTION=BUILD
CLASS=CRITERIA
NAME=‘APPL=application id
[TYPE={PUBLIC | PRIVATE | FREEFORM}]
[USER=userid]
NAME=criteria name’
PARMS=‘MESSAGE=message’
A required parameter (not applicable for TYPE=FREEFORM) giving the application identifier of the criteria.
An optional parameter giving the type of the criteria. Valid values are as follows:
Public criteria—available for general use.
Private criteria—owned by a specific user ID.
Free-form criteria—presents a panel for the user to enter criteria.
Note: If you do not specify TYPE or USER, the function attempts to find a PRIVATE definition owned by the invoking user ID first. If unsuccessful, the function uses a PUBLIC definition.
An optional parameter (not applicable for TYPE=PUBLIC and TYPE=FREEFORM) giving the user ID of the user owning the criteria. Default is the user ID of the user invoking the function.
A required parameter (not applicable for TYPE=FREEFORM) giving the name of the criteria.
A message to be displayed on the criteria panel, if one is defined.
Variables with prefixes as specified in SHRVARS.
This statement contains the following return variables:
The criteria lines.
The total number of criteria lines built (up to 9999). The value gives the number of &$CRCRITnnnn variables.
Set to YES or NO indicating whether a run time panel is defined.
Set to EXIT or ACTION indicating the command executed to terminate the run time panel, if a run time panel is defined, otherwise set to null.
System message. Contains the error message (for return code 8).
If a return code of 8 is set, then additional information is available as one of the following feedback codes, set in &$CAFDBK:
Definition not found
Canceled by exit
Processing error
Nesting level exceeded
The following statements build the public criteria ZPRPR001 for the application identified by the ID ZPR:
&CONTROL SHRVARS=($CR,ZPR) -EXEC $CACALL OPT=ACTION + ACTION=BUILD + CLASS=CRITERIA + NAME=‘APPL=ZPR + TYPE=PUBLIC + NAME=ZPRPR001’
| Copyright © 2008 CA. All rights reserved. |
|