Can I use an Alias to access a local or remote table in Report Facility?

Document ID : KB000052702
Last Modified Date : 14/02/2018
Show Technical Document Details

Description

When defining a new query, you must select the table(s) you want to query. In addition to tables, you can also select aliases. The aliases can exist for tables on the local subsystem or the alias can exist for tables on the remote subsystem. One of the key components in selection of the tables is the information entered in the LOC parameter.

Note:

Ensure ptf URFF180 for r11.5.3 is applied in order to use Aliases defined for tables on Remote subsystems.

Solution

To access a table using an alias for a table on the local subsystem, issue the 'CREATE ALIAS alias-name FOR table-name' statement where alias-name is the user defined name and table-name is the table name on the Local subsystem used to create the Alias. For example: CREATE ALIAS LEYJA02.D81B_ALIAS FOR LEYJA02.JLCOMMA. Within Report Facility to access the table, set the TYPE to 'A' and LOC to 'LOCAL' and then S(elect) LEYJA02.D81B_ALIAS and the table will be displayed.

                 SLTB.03  r11.5    ---------------- SELECT TABLES -----------
COMMAND==>                                                  
                                                            
                                                            
NAME=> *               ID=> LEYJA02     LOC=> LOCAL   
TYPE=> A                                                    
    1 (A) LEYJA02.ACT_NOLOC                              
    Label:                                                
    2 (A) LEYJA02.D81B_ALIAS                             
    Label: 

To access a table using an alias for a table on the remote subsystem, issue the 'CREATE ALIAS alias-name FOR table-name' statement where alias-name is the user defined name and table-name is the table name on the remote subsystem used to create the Alias. For example: CREATE ALIAS LEYJA02_D81A_ALIAS FOR D81APTIB.LEYJA02.ACT where D81APTIB is the Location name for a remote DB2 subsystem where the object resides. Within Report Facility to access the remote table, set the type to 'A' and LOC to the location name for the remote subsystem.

SLTB.03  r11.5    ---------------- SELECT TABLES -----------
COMMAND==>                                                  
                                                            
                                                            
NAME=> *                  ID=> LEYJA02     LOC=> D81APTIB
TYPE=> A                                                    
    1 (L) LEYJA02.ACT_ALIAS                              
    Label:                                                
    2 (L) LEYJA02.D81A_ALIAS                             
    Label:  

Within Report Facility to access the table, set the TYPE to 'A' and LOC to the remote location ID and then S(elect) LEYJA02.D81A_ALIAS and the table will be displayed.

Note:

Ensure ptf URFF180 for r11.5.3 is applied in order to use Aliases defined for tables on Remote subsystems.