User Tools

Site Tools


setalias_set_a_file_alias_.htm
Navigation:  ABC Library Reference > RelationManager > RelationManager Methods >====== SetAlias (set a file alias) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

SetAlias( relationmanager )

blk2blue.jpg

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

setalias_set_a_file_alias_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1