This function enables the establishment and use of tables of aliases. An alias is a string that, when it matches a minimum portion of an alias table entry, has another value that is substituted for it.
result = $ALIAS({ADD },table,{alias }) {CREATE} {width } {DELETE} {name,object} {LIST } {name } {XLATE }
Contains one of these values:
(any successful list operation): The maximum length of any instance of name, followed by the maximum length of any instance of object (separated by a blank).
(any other successful operation): Affirmative message.
(any unsuccessful operation): Error text.
Adds an alias entry.
Creates an alias table.
Deletes an alias entry.
Lists the contents of an alias table. Entries are returned on the stack, one entry per record. Fields are blank-delimited and consist of:
Translates the given alias string into an object.
Alias table name. This name is an arbitrary name. It should not begin with a dollar sign ($), because these names are reserved for use by CA.
Character string to be used in a search of the alias table. This string is not case-sensitive.
Maximum number of characters that can appear in any object in the table being created.
Name to be added to the table as an alias. The first character must be an uppercase character. During comparisons, the leading uppercase portion of the name must be present in the alias being checked. The remaining characters in the alias being checked (if any) must then match the trailing, lowercase portion of the name. When specified with a DELETE operation, the case is not checked.
The text string that is returned upon match by an alias.
ARG n MISSING OR INVALID
TABLE ALREADY EXISTS
TABLE DOES NOT EXIST
NO REQUIRED CHARACTERS
THIS ENTRY MATCHES EXISTING ENTRY
ALIAS NOT FOUND
Example
$ALIAS('CREATE',TAB1,80) $ALIAS('ADD',tab1,'ABCdef','xyz') $ALIAS('XLATE',tab1,'abc') == 'xyz' $ALIAS('XLATE',tab1,'ab') == 'ALIAS NOT FOUND' $ALIAS('XLATE',tab1,'abcdefx') == 'ALIAS NOT FOUND' $ALIAS('XLATE',tab1,'abcde') == 'xyz'
Copyright © 2014 CA Technologies.
All rights reserved.
|
|