Previous Topic: Literal ValueNext Topic: Multiple WITH Clauses


Literal Masking

You can use a literal value which specifies that only certain positions within a column are to be compared. This is called literal masking. A literal mask designates a set of characters which CA Dataquery compares position by position to the value of operand1. In those positions which you do not want to specify a character, use the literal masking character.

If the column is numeric, only numeric characters other than the literal masking character can be specified in the literal. Unsigned, zoned, decimal columns and signed or unsigned, packed decimal columns can be masked. Do not include decimal points, dollar signs or minus signs in the literal. You can specify up to 15 literal values per WITH clause.

Note: Select the System Profile topic from the List of Help Topics panel (HELP) command to see which character has been designated as the Literal Masking character at your site. The default is the pound sign (#).

For example, if operand1 is a five-character column, and you want to select all the rows which have a C in the second position of its value, you can specify the following literal mask:

'#C#'

In this example, the pound sign is a literal masking character.

Notice that the literal does not contain five characters. Whenever the (#) appears as the last position of the mask, CA Dataquery assumes the special character fills the other positions to the proper length of the column.