Specifying Acceptable Values for a Dimension

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.


Top of page

x
Syntax: How to Specify a List of Acceptable Values for a Dimension
ACCEPT=value1 OR value2 OR value3...

where:

value1, value2, value3...

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.



Example: Specifying a List of Acceptable Products for a Dimension

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'

Top of page

x
Syntax: How to Specify a Range of Acceptable Values for a Dimension
ACCEPT=value1 TO value2

where:

value1

Is the value for the beginning of the range.

value2

Is the value for the end of the range.



Example: Specifying a Range of Acceptable Values for a Dimension

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

Top of page

x
Syntax: How to Verify Data Against Values in an External Flat Data Source
ACCEPT=(ddname)

where:

ddname

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.



Example: Verifying Data Against Acceptable Values for the State Field

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)

WebFOCUS