access.pre-processor Definition/Access: Verbs


Command access.pre-processor Definition/Access: Verbs
Applicable release versions: AP 6.1
Category Access: Verbs (152)
Description The Access Pre-Processor is an enhancement to the Access querry language used on Pick systems. The pre-processor provides two major functions. First, it adds the ability to use and define phrases which contain parts of Access statements. Second, it eliminates the requirement that explicit values be enclosed in quotation marks, except to resolve ambiguities.

The Access Pre-Processor is enabled by changing the verb definition in the M/DICT for any Access verbs for which pre-processing is desired. The pre-processor scans the input sentence, expands phrases and determines which words are values, then passes the sentence to the standard Access compiler.

In normal operation, the Access Pre-Processor processes the input statement before the Access compiler.

Quotation Marks

With the Access Pre-Processor, quotation marks are not required to distinguish values from other parts of an Access sentence. Any word which is not in the file dictionary (or M/DICT), is assumed to be a value, provided that it makes sense to use a value in that part of the sentence. If it does not make sense, then an error message is printed and the sentence is aborted.

It is still necessary to use quotation marks when there is an ambiguity in the meaning of a word. For example,


could mean to list the item 'D/CODE' showing the attribute D/CODE, or it could mean list all items showing the attribute D/CODE in two columns. In this case, quotation marks are required to distinguish between the first and second meaning. Also, if a value contains blanks, quotation marks are required to distinguish between a single value with embedded blanks, and multiple values separated by blanks.

Headings, footings, break-on options and grand-total headings must still be enclosed in quotation marks.
Options y causes a message to be displayed whenever the Pre-Processor assumes an undefined word is a value. The message shows the undefined word and the context it is assumed to be used in. The processed sentence is then displayed on the screen before entering the Access compiler. The terminal will wait for a key to be pressed before proceeding. If a control-X is entered, then the sentence will be aborted.

z used to override the Access Pre-Processor. If the Z option is present, the pre-processor is bypassed, and the Access compiler is entered directly.
The following examples show typical Access statements in which quote marks are 
not required. Each of these examples will utilize the 'Y' option 
which will display a message defining how the pre-processor interprets the 

SORT SALES BY DATE WITH DATE >= 1/1/87 AND <= 12/31/87 (Y
[2393] Assumed '1/1/87' is a value used as selection criteria on 
attribute 'DATE'.
[2393] Assumed '12/31/87' is a value used as selection criteria on 
attribute 'DATE'


In this example the Access pre-processor identified one selection clause with 
two values and then showed the Access statement complete with quote marks.

LIST ORDERS 1234 1235 (Y
[2391] Assumed '1234' is an item-id, or modifies the item-id.
[2391] Assumed '1235' is an item-id, or modifies the item-id.

LIST ORDERS '1234' '1235'

In this example the pre-processor correctly identified two item-ids and then 
showed the Access statement including quote marks.

[2395] '1000.00' is a value used to modify the sort clause 
        on attribute 'BALANCE'.


This example shows that the pre-processor is able to identify that 1000.00 is a 
value used to modify the BY-EXP sort clause.

LIST G/L BALANCE > 1000.00 (Y
[2392] '1000.00' is a print limitter which modifies 
LIST G/L BALANCE > "1000.00" 

This example shows the Access pre-processor identify that the value 
'1000.00' is a print limitter modifying the output attribute 
'BALANCE'. The statement will list all items but only values greater 
that 1000.00 will be printed for the column BALANCE. NOTE that BALANCE is an 
output attribute. If the word 'WITH' was included in this statement 
then 'BALANCE > 1000.00' would be a selection criterion.
Related access.introduction