Navigation: ABC Library Reference > RelationManager > RelationManager Methods >====== SetAlias (set a file alias) ====== | |
SetAlias( relationmanager )
SetAlias | Identifies an alias of this object's primary file. |
relationmanager | The label of the alias file's RelationManager object. |
The SetAlias method identifies an alias of this RelationManager object's primary file so that, when appropriate, the RelationManager only processes the file one time. For example, if both the primary file and its alias are part of a framed transaction (LOGOUT/COMMIT), the RelationManager recognizes the alias and appropriately applies the LOGOUT only to the primary file.
Example:
Customer FILE,DRIVER('TOPSPEED'),PRE(CLI),NAME('Customer') !declare Customer file
IDKey KEY(CLI:ID),NOCASE,OPT,PRIMARY
Record RECORD,PRE()
ID LONG
Name STRING(20)
END
END
Client FILE,DRIVER('TOPSPEED'),PRE(CUS),NAME('Customer') !declare Client 'alias'
IDKey KEY(CUS:ID),NOCASE,OPT,PRIMARY
Record RECORD,PRE()
ID LONG
Name STRING(20)
END
END
Relate:Customer.SetAlias( Relate:Client ) !Client = alias of Customer