How to: |
The optional ACCEPT attribute enables you to specify a list of acceptable values for use in an OLAP-enabled Master File.
ACCEPT is useful whenever data fields are to be addressed by several requests. One ACCEPT attribute in the Master File eliminates the need to provide lists in each separate procedure (FOCEXEC).
The ACCEPT attribute enables you to specify:
The use of the lookup option is helpful when the list of values is large and undergoes frequent change.
ACCEPT=value1 OR value2 OR value3...
where:
Is a list of acceptable values. Any value in the ACCEPT list which contains an embedded blank must be enclosed within single quotation marks. For values without embedded blanks, single quotation marks are optional.
The following shows the ACCEPT syntax in the Master File, which specifies the list of acceptable products: Espresso, Latte, Cappuccino, Scone, Biscotti, Croissant, Mug, Thermos, Coffee Grinder, and Coffee Pot.
ACCEPT='Espresso' OR 'Latte' OR 'Cappuccino' OR 'Scone' OR 'Biscotti' OR 'Croissant' OR 'Mug' OR 'Thermos' OR 'Coffee Grinder' OR 'Coffee Pot'
ACCEPT=value1 TO value2
where:
Is the value for the beginning of the range.
Is the value for the end of the range.
The following shows the ACCEPT syntax in the Master File, which specifies a range of acceptable data values between 150 and 1000.
ACCEPT=150 TO 1000
ACCEPT=(ddname)
where:
Is the ddname that points to the fully qualified name of an existing data source that contains the list of acceptable values. The ddname can consist of a maximum of 8 characters. Note that you must FILEDEF or ALLOCATE the ddname to the external data source. You can issue the FILEDEF or ALLOCATE statement in any valid profile.
The OSTATE data source contains the list of all acceptable values for the state field. The following shows the ACCEPT syntax in the Master File which verifies state values against the external OSTATE data source:
ACCEPT=(OSTATE)