Using an Alias to access a local or remote table in Report Facility
search cancel

Using an Alias to access a local or remote table in Report Facility

book

Article ID: 52702

calendar_today

Updated On:

Products

Report Facility

Issue/Introduction

When defining a new Report Facility (PRF) 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.

 

Resolution

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 USER01.D81B_ALIAS FOR USER01.JLCOMMA.
Within Report Facility to access the table, set the TYPE to 'A' and LOC to 'LOCAL' and then S(elect) USER01.D81B_ALIAS and the table will be displayed.

                 SLTB.03  r11.5    ---------------- SELECT TABLES -----------
COMMAND==>                                                  
                                                            
                                                            
NAME=> *               ID=> USER01     LOC=> LOCAL   
TYPE=> A                                                    
    1 (A) USER01.ACT_NOLOC                              
    Label:                                                
    2 (A) USER01.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 USER01_D81A_ALIAS FOR D81APTIB.USER01.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=> USER01 LOC=> D81APTIB TYPE=> A 1 (L) USER01.ACT_ALIAS Label: 2 (L) USER01.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) USER01.D81A_ALIAS and the table will be displayed.

Additional Information

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