How to: |
Reference: |
ACCEPT is an optional attribute that you can use to validate data as it is entered into a parameter prompt screen.
Note: Suffix VSAM and FIX data sources may use the ACCEPT attribute to specify multiple RECTYPE values, which are discussed in Describing a Sequential, VSAM, or ISAM Data Source.
The ACCEPT attribute supports the following types of operations:
This option is used to specify one or more acceptable values.
This option is used to specify a range of acceptable values.
This option is used to validate incoming transaction data against a value from a FOCUS data source when performing maintenance operations on another data source. FIND is only supported for FOCUS data sources and does not apply to OLAP-enabled synonyms. Note also that, in the Maintain environment, FIND is not supported when developing a synonym.
This option is used to supply pairs of values for auto amper-prompting. Each pair consists of one value that can be looked up in the data source and a corresponding value for display.
This option is used to retrieve lookup and display field values by running a FOCEXEC. Each row in the output must include one value for lookup and a corresponding value for display. These values can be anywhere in the row, in any order. The FOCEXEC can return other columns as well.
This option is used to look up values in another data source and retrieve a corresponding display value. The lookup field values must exist in both data sources, although they do not need to have matching field names. You supply the name of the synonym, the lookup field name, and the display field name.
ACCEPT = list
ACCEPT = value1 TO value2
ACCEPT = FIND (field [AS name] IN file)
ACCEPT=SYNONYM(lookup_field AS display_field IN lookup_synonym)
ACCEPT=FOCEXEC(lookup_field AS display_field IN lookup_focexec)
where:
value1 OR value2 OR value3...
For example, ACCEPT = RED OR WHITE OR BLUE. You can also use a blank as an item separator. If the list of acceptable values runs longer than one line, continue it on the next. The list is terminated by a comma.
Gives the range of acceptable values. For example, ACCEPT = 150 TO 1000.
Verifies the incoming data against the values in another indexed field. This option is available only in MODIFY procedures for FOCUS data sources. For more information, see Describing a FOCUS Data Source.
Looks up values in another data source and retrieves a corresponding display value. The lookup field values must exist in both data sources, although they do not need to have matching field names. You supply the name of the synonym, the lookup field name and the display field name.
Retrieves lookup and corresponding display values by running a FOCEXEC. Each row must return a lookup field value and its corresponding display field value anywhere in the row, in any order. You supply the name of the FOCEXEC, the lookup field name, and the display field name.
Is the field in the lookup_synonym or returned by the lookup_focexec whose value will be used in the filter (WHERE dialogue) or by the amper autoprompt facility that will be compared with the field that has the ACCEPT attribute.
Is the field in the lookup_synonym or returned by the lookup_focexec, whose value will be displayed for selection in the filter dialogue or amper autoprompt drop-down list.
Is the name of the synonym that describes the lookup data.
Is the name of the FOCEXEC that returns the lookup and display field values, in any order. This FOCEXEC can return other field values as well.
Any value in the ACCEPT that contains an embedded blank (for example, Great Britain) must be enclosed within single quotation marks.
If the ACCEPT attribute is included in a field declaration and the SET command parameter ACCBLN has a value of OFF, blank ( ) and zero (0) values are accepted only if they are explicitly coded into the ACCEPT. SET ACCBLN is described in the Developing Reporting Applications manual.
ACCEPT = SPAIN OR ITALY OR FRANCE OR 'GREAT BRITAIN'
Note the following rules when using ACCEPT: