AS

AS

Top  Previous  Next

 

The AS keyword is a field qualifier which defines a synonym for a field and any qualifying information.

 

 

Format

 

field.name {field.qualifier} AS synonym

 

where

 

field.nameis the name of the field (D or I-type) or an evaluated expression to be given a synonym.

 

field.qualifieris any qualifying information such as CONVor FMT keywords.

 

synonymis the name by which the field and its qualifiers is to be known. This name must not correspond to an existing entry in the file's dictionary or in the VOC.

 

The AS keyword creates a synonym for field.name together with any field.qualifier. It is normally only used in conjunction with a field.qualifier or to name an evaluated expression.

 

 

Example

 

LIST INVOICES EVAL "SUM(RECEIVED)" AS AMT BY.DSND AMT

 

This command processes records from the INVOICES file and reports the total of the multivalued RECEIVED field . The report is displayed in descending order of total received amount. The AS keyword is used to give the synonym AMT to the evaluated sum so that it can be referred to again in the sort clause after the BY.DSND keyword without full expansion.

 

 

See also:

EVAL