Specifying a Db2® object name

When you use any of the FM/Db2 functions listed below, you specify the name of the Db2® table or view you want to work with in the same way.
  • View (option 1)
  • Edit (option 2)
  • Print (option 3.1)
  • Copy (option 3.3)
  • Import (option 3.6)
  • Export (option 3.7)
  • Create (option 3.8)
  • Prototyping: Basic (option 4.1)
  • Browse (B command on Primary Option Menu panel, or B prefix command against an object in a list of Db2® objects)
Print utility panel shows a typical panel containing the entry fields for specifying a Db2® object,
Figure 1. Print utility panel
  Process   Options   Utilities   Help
                                                                        
 FM/Db2 (DFG2)                   Print Utility

 Db2 Object:
 ❶ Location  . . . . .                     ❹  Database . .          (optional)
 ❷ Owner . . . . . . . DSN8810           + ❺  Table space           (optional)
 ❸ Name  . . . . . . . EMP                                                 +

    Row count . . . . . ALL            Number of rows to print

 Db2 Template:
    Data set name . . .                                              
    Member  . . . . . .         

 Processing Options:
    Print Mode       Template usage               Enter "/", "A"lways to select
    1  1. Table      3  1. Above                     Edit template
       2. Single        2. Previous                  Batch execution
                        3. Generate from table       Use uncommitted read
                        4. Generate/Replace          Print HEX representation
 Command ===>                                                                  
  F1=Help      F2=Split     F3=Exit      F4=Expand    F5=Actions   F7=Backward
  F8=Forward   F9=Swap     F10=Left     F11=Right    F12=Cancel
The panels for each of the preceding FM/Db2 functions contain the following entry fields, all of which are optional apart from Name:
❶ Location
The location of the table or view.
If the table or view that you want to work with is at your current location, leave this field blank. Otherwise, type:
  • The full name of the remote location
  • An asterisk (*) to display all available remote locations, or
  • A pattern using wild card characters

If you specify an asterisk on its own or a pattern, FM/Db2 displays a selection list showing the locations that match the input specification. To select the location you want, type S against the required entry and press Enter. The location selection list is not available unless access to certain Db2® catalog tables has been granted to FM/Db2 users. When the access is not available, you can still access a remote Db2® system by specifying the exact location name.

When you enter a value in this field, synonym object names are not recognized and are not included in the selection list.

It is also possible to specify the location of a Db2® system using:
  • The Db2® subsystem ID
  • A location nickname defined for the Db2® system
Note: In what follows, the use of either the Db2® subsystem ID, or a location nickname, is referred to as an alternative location reference.
In order to be able to use these alternatives, the systems programmer must have defined the location value and location nickname in the FMN2SSDM macro definition for each Db2® system (FMN2POPT module). You can check whether a location and location nickname have been defined by selecting About Db2 from the Help pull-down menu.
  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFE2)                    Copy Utility

 From Db2 Object:
   ┌────────────────────── Db2 Connection Information ───────────────────────┐ )
   │                                                                         │ )
   │ Db2 Subsystem . . . : DFE2                                              │ +
   │ SQLID . . . . . . . : PERTHAP                                           │
   │ Description . . . . : Db2 Version 12 - Development system              │
   │ Release . . . . . . : 0915                                              │
 F │ FM/Db2 Plan names . : FMN2PLNA   │                     : FMN2GENA                                          │
   │ Attach facility . . : CAF                                               │
   │ Auditing  . . . . . : SAF-RULE CONTROLLED                               │
 P │ Location  . . . . . : QXPFMD2DFE2                                       │
   │ Location nickname . : V10DEV                                            │
   │ DECFLOAT Round mode : ROUND Half Even                                   │
   │                                                                         │
   │  F1=Help     F2=Split    F3=Exit     F4=Expand   F9=Swap    F12=Cancel  │
   └─────────────────────────────────────────────────────────────────────────┘
 Command ===>
  F1=Help      F2=Split     F3=Exit      F4=Expand    F7=Backward  F8=Forward
  F9=Swap     F10=Left     F11=Right    F12=CanCommand ===> D2SSCI

If a location value has been specified, you can use the Db2® subsystem ID (for example, DFE2) as an alternative to the actual location name. If location and location nickname values have been specified, you can use the location nickname (for example, V9DEV) as an alternative to the actual location name.

You cannot use wildcards when specifying an alternative location reference. When you specify an alternative location reference, the actual location appears in any location reference displayed by FM/Db2; that is, in the Db2® object name shown in a File Manager/Db2 editor session. Similarly, any Db2® object name specified in a Db2® batch job is the actual location name. Specifying an alternative location reference in a File Manager/Db2 batch job is not supported.

You can only access remote locations that have been defined to your local Db2® subsystem.

❷ Owner
The authorization ID of the owner of the table, view, or alias.

If you leave this field blank, FM/Db2 uses the current SQL ID. Otherwise, type the full name of the owner, an asterisk (*) to match any owner, or a pattern using wild card characters.

To specify a synonym in the object name field, either leave this field blank, or specify a generic name that includes the current SQLID, or specify the current SQLID. Synonyms are not recognized or included on the table selection list if any of the table space, database, or location fields are non-blank.

Note: Db2® alias names are recognized. Db2® synonyms are not recognized.
❸ Name
The name of the Db2® object.

This entry field is mandatory. Type the full name of the Db2® object, an asterisk (*) to display the names of all available objects, or a pattern using wild card characters.

To specify a synonym in this field, type the name of the synonym and ensure that the owner field is either blank, a generic name that includes the current SQLID, or the current SQLID. Synonyms are not recognized or included in the table selection list if any of the table space, database, or location fields are non-blank.

❹ Database
The name of the database to which you want to restrict your selection.

Leave this field blank if you do not want to confine the selection to specific databases. Otherwise, type the full name of the database, an asterisk (*) to match any database, or a pattern using wild card characters.

When you enter a value in this field, synonym names are not recognized or included in the selection list.

❺ Table space
The name of the table space to which you want to restrict your selection.

Leave this field blank if you do not want to confine the selection to specific table spaces. Otherwise, type the full name of the table space, an asterisk (*) to match any table space, or a pattern using wild card characters.

When you enter a value in this field, synonym names are not recognized or included in the selection list.

If you specify an asterisk (*) or a pattern in one or more of the preceding entry fields (Owner, Name, Database, Table space), FM/Db2 displays a selection list showing the Db2® tables and views that match all the selection criteria entered in these fields. The selection list may also include synonyms entries under circumstances discussed above.

To select the table, view, or synonym you want, type S in the selection column next to the required entry.

For example, say you specified __DB2 in the Owner entry field, *EMP* in the Name entry field, and FM* in the Database entry field. FM/Db2 displays a selection list of Db2® tables and views where:
  • The name of the owner is five characters long, with Db2® as the last three characters,
  • The name of the Db2® table or view contains the characters “EMP”, and
  • The name of the database starts with “FM”.

To select, say, the view VEMP, type S in the selection column next to that entry.

Related tasks

Related references