Previous Topic: Criteria Exit Procedure Statements

Next Topic: &$CROPT=TERM Statement


&$CROPT=INIT Statement

This statement indicates initialization processing on the criteria. When the value of &$CROPT is INIT, you can use the criteria exit procedure to perform any special initialization processing on the criteria.

Read-Only Variables

This statement contains the following read-only variables:

&$CROPT

This variable is set to INIT.

&$CRAPPLID

This variable is set to the ID of the application to which the criteria set belongs.

&$CRCRITTYPE

This variable is set to one of the following types:

PUBLIC

The criteria set is public.

PRIVATE

The criteria set is private.

&$CRCRITUSER

If the criteria set is private, this variable is set to the ID of the user to whom the criteria set belongs. If the criteria set is public, this variable is not set.

&$CRCRITNAME

This variable is set to the name of the criteria.

&$CRDESC

This variable is set to the description of the criteria.

&$CRPANEL

This variable is set to the name of the run-time panel defined for the criteria.

&$CRDATASRC

This variable is set to the data source defined for the criteria.

&$CREPARMTOT

This variable is set to the number of exit parameter lines defined for the criteria in the range 0 to 9999.

&$CREPARMn

This range of variables are set to the exit parameters defined for the criteria if &$CREPARMTOT is greater than zero; n is in the range 1 to the value of &$CREPARMTOT.

&$CRFKA1

This variable is set to the first line of the function key area if a run-time panel is defined for the criteria. If a run-time panel is defined, this variable must be specified as an output variable on the first line of the #TRAILER statement in the panel definition.

&$CRFKA2

This variable is set to the second line of the function key area if a run-time panel is defined for the criteria. If a run-time panel is defined, this variable must be specified as an output variable on the second line of the #TRAILER statement in the panel definition.

Modifiable Variables

This statement contains the following modifiable variables:

&SYSMSG

Use this variable to return a message. If an error occurs during special processing, this variable must be set to an error message.

Return Codes

The variable &RETCODE must be set by the criteria exit procedure to one of the following return codes:

0

Continue processing

8

An error occurred; terminate building the criteria