Alias_File - DataDictionary

Declares this DD to be an alias DD

Type: Procedure Set

Data Type: Integer

Parameters: Integer iTable

ParameterDescription
iTable(New) alias table number to use for this DD


Syntax
Procedure Set Alias_File Integer iTable

Call: Set Alias_File to iTable


Description

This declares this DD to be an alias DD and makes iTable the Main_File for this DD. This creates an Alias based on this new table. Main_File is assigned iTable and the old Main_File, which is the master table, is stored and accessible via Get MasterForAlias. It also initializes the class to work as an alias, which is mostly done by calling DefineAsAlias, which can be augmented.

Main_File must be set before this message is sent. Normally, the Main_File will have been set in the Master DD superclass, although it is permissible, albeit unusual, to set both the Main_File and the Alias_File in a single class (in that order).

You can only define an alias file to a DD that 1) has a main_file and 2) is not yet an alias. In other words, you can use this to sub-class regular DD classes, but you cannot use it to sub-class alias DD classes.


Alias DDs always use local relates. Relates can either be defined by a table or by the DD. pbUseDDRelates determines if relates are defined by the table (False) or the DD (True). See pbUseDDRelates for more information


Sample

In this case, the alias table, SalesPManager, must already be added to filelist and presumably some other DD would relate to the table (either via table or DD relate). If this alias DD had parents, presumably other alias DDs, you would need to establish those relationships using DD relates.

Class cSalesPManagerDataDictionary is a SalesP_DataDictionary
    Procedure Construct_Object
        Forward Send Construct_Object
        Set Alias_File to SalesPManager.File_Number
    End_Procedure
End_Class