Managing Mumps Metadata

In this section:

When the server accesses a data source, it needs information on how to interpret the data stored there. For each data source the server will access, you create a synonym that describes the structure of the data source and the server mapping of the Mumps data types.


Top of page

x
Creating Synonyms

How to:

Reference:

x

Synonyms define unique names (or aliases) for each Mumps table or view that is accessible from a server. Synonyms are useful because they hide the location and identity of the underlying data source from client applications. They also provide support for extended metadata features of the server such as virtual fields and additional security mechanisms.

Using synonyms allows an object to be moved or renamed while enabling client applications to continue functioning without modification. The only modification required is a redefinition of the synonym on the server. The result of creating a synonym is a Master File and Access File.



x
Procedure: How to Create a Synonym

To create a synonym, you must have previously configured the adapter. You can create a synonym from the Applications or Adapters pages of the Web Console.

  1. From the Web Console menu bar, click Applications.

    The Applications page opens.

  2. Click the New button and select Synonym from the drop-down menu.

    The Select adapter to configure or Select connection to create synonym pane opens.

  3. Click a connection for the configured adapter.

    The first of a series of synonym creation panes opens.

  4. Enter values for the parameters required by the adapter as described in the synonym creation parameters reference.
  5. After entering the parameter values, click Create Synonym.

    The Status pane indicates that the synonym was created successfully.

The synonym is created and added under the specified application directory.

Note:



x
Reference: Synonym Creation Parameters for Digital Standard Mumps

The following list describes the parameters for which you will need to supply values, and related tasks you will need to complete in order to create a synonym for the adapter. These options may appear on multiple panes. To advance from pane to pane, click the buttons provided, ending with the Create Synonym button, which generates the synonym based on your entries.

Select UCIs

If you wish to filter UCIs (User Class Identifiers), click the Filter UCIs check box and enter a UCI name, then click Next.

To select all UCIs, simply click Next.

Note that the list of UCIs displayed depends on the volume that was specified when the adapter was configured.

Select tables

Choose the UCI that contains the tables (globals) for which you wish to create synonyms, then click Select Tables.

Application

Select an application directory. The default value is baseapp.

Prefix/Suffix

If you have tables with identical table names, assign a prefix or a suffix to distinguish them. For example, if you have identically named human resources and payroll tables, assign the prefix HR to distinguish the synonyms for the human resources tables. Note that the resulting synonym name cannot exceed 64 characters.

If all tables and views have unique names, leave the prefix and suffix fields blank.

Overwrite Existing Synonyms

To specify that this synonym should overwrite any earlier synonym with the same fully qualified name, select the Overwrite existing synonyms check box.

Note: The connected user must have operating system write privileges in order to recreate a synonym.

Select globals

To select all globals in the list, select the check box to the left of the Default Synonym Name column heading.

To select specific globals, select the corresponding check boxes.

Default Synonym Name

This column displays the name that will be assigned to each synonym. To assign a different name, replace the displayed value.

Mark for Global Scan

The Mark for Global Scan check box is activated for all selected globals.

  • Click the check box if you wish to create a synonym that is ready for reporting, based on default subscript names.
  • Do not click the check if you wish to create a synonym template that you can modify manually by entering actual field names before you use it for reporting. The template contains 25 segments.

    Tip: You can modify the synonym manually from the navigation pane in the Web Console or the Data Management Console. Right-click the synonym and choose either Edit as Text to open a text editor or Edit/Open to open a graphical viewing/editing tool.



Example: Creating a Synonym

To generate a synonym for the global Civic, enter the following information on the Create Synonym panes of the Web Console or the Data Management Console:

  1. On the first Create Synonym pane, click the Next button since filtering UCIs is not required for this example.

    Note that the list of UCIs displayed depends on the volume you specified when you configured the adapter. In this example, the volume is RAB.

  2. On the second Create Synonym pane, choose EDA as the UCI that contains the tables (globals) for which you wish to create synonyms, then click Select Tables.
  3. On the third pane, select the global CLINIC from the displayed list.
  4. Click Create Synonym. The synonym is created and added under the specified application directory (baseapp is the default).

    A status window displays the message: All Synonyms Created Successfully

  5. From the message window, click Applications on the menu bar.
  6. Open the baseapp application folder in the navigation pane and click the synonym clinic.
  7. Choose Edit as Text from the menu to view (and edit) the generated Master File.

    Generated Clinic Master File

    FILE=CLINIC, SUFFIX=DSM, $
    SEGMENT=GLOBAL, SEGTYPE=U, $
      FIELD=DUMMY, ALIAS=SUBSCRIPT, USAGE=A1,   ACTUAL=A1,   $
      FIELD=GLOBAL_VALUE, ALIAS=GLOBAL_VALUE, USAGE=A512, ACTUAL=A512, $
    SEGMENT=SUB1, SEGTYPE=S0, $
      FIELD=SUB1, ALIAS=SUBSCRIPT,  USAGE=A245, ACTUAL=A245, $
    SEGMENT=SUB2, SEGTYPE=S0, $
      FIELD=SUB2, ALIAS=SUBSCRIPT,  USAGE=A245, ACTUAL=A245, $
    SEGMENT=SUB3, SEGTYPE=S0, $
      FIELD=SUB3, ALIAS=SUBSCRIPT,  USAGE=A245, ACTUAL=A245, $
      FIELD=VAL3, ALIAS=VAL3,       USAGE=A512, ACTUAL=A512, $

    Note that, unlike other databases, Mumps does not provide column names. Therefore, the API does not return column names. All columns are assigned names prefixed with SUB and numbered sequentially (SUB1, SUB2,..., SUBn). However, if you wish you can manually change the field names generated in the synonym to make them more descriptive. Data value fields are placed in the segment associated with the subscript. Data values might contain a sequence of variable length fields delimited by special characters. These delimiting characters are described in the Access File and are associated with subscript segments.

  8. Close the Master File in the text editor and click the synonym clinic again. This time choose Edit Access File as Text from the menu.

    Generated Clinic Access File

    UCI=EDA, VOLUMESET=RAB, GLOBAL=CLINIC, CARDINALITY=6, WRITE=NO, $
    SEGNAM=GLOBAL, DELIMITER=,$
    SEGNAM=SUB3, DELIMITER=,$


Example: Master File Clinic With Redefined Data

To facilitate reporting, you can manually redefine data in the Master File, as illustrated in an edited version of the Master File synonym Clinic, where the field VAL3 has been redefined. To compare the edited version with the original, see Creating a Synonym.

FILE=CLINIC, SUFFIX=DSM, $
SEGMENT=GLOBAL, SEGTYPE=U, $
  FIELD=DUMMY, ALIAS=SUBSCRIPT,USAGE=A1,   ACTUAL=A1,    $
  FIELD=GLOBAL_VALUE, ALIAS=GLOBAL_VALUE, USAGE=A512, ACTUAL=A512, $
SEGMENT=SUB1, SEGTYPE=S0, $
  FIELD=SUB1, ALIAS=SUBSCRIPT, USAGE=A245, ACTUAL=A245,  $
SEGMENT=SUB2, SEGTYPE=S0, $
  FIELD=SUB2, ALIAS=SUBSCRIPT, USAGE=A245, ACTUAL=A245,  $
SEGMENT=SUB3, SEGTYPE=S0, $
  FIELD=SUB3, ALIAS=SUBSCRIPT, USAGE=A245, ACTUAL=A245,  $
  FIELD=VAL3, ALIAS=VAL3,      USAGE=A512, ACTUAL=A512,  $
SEGMENT=SUB3RED, SEGTYPE=S0, PARENT=SUB3, POSITION=VAL3, $
  FIELD=VAL3A, ALIAS=VAL3A,    USAGE=A4,   ACTUAL=A4,    $
  FIELD=VAL3B, ALIAS=VAL3B,    USAGE=A4,   ACTUAL=A4,    $
  FIELD=VAL3C, ALIAS=VAL3C,    USAGE=A9,   ACTUAL=A9,    $
  FIELD=VAL3D, ALIAS=VAL3B,    USAGE=P6.2, ACUTAL=A6,    $

Tip: To edit the Master File, click the synonym and choose either Edit as Text to open a text editor or Open to open a graphical viewing/editing tool.



x
Reference: Managing Synonyms

Once you have created a synonym, you can right-click the synonym name in the Adapter navigation pane of either the Web Console or the Data Management Console to access the following options.

Option

Description

Open

Opens the Master File for viewing and editing using a graphical interface. If an Access file is used it will be also available.

Edit as Text

Enables you to view and manually edit the Master File synonym.

Note: To update the synonym, it is strongly recommended that you use the graphical interface provided by the Open option, rather than manually editing the Master File.

Edit Access File as Text

Enables you to view and manually edit the Access File synonym.

Note: This option is available only when an Access File is created as part of the synonym.

Sample Data

Retrieves up to 20 rows from the associated data source.

Data Profiling

Data Profiling provides the data characteristics for synonym columns.

Alphanumeric columns provide the count of distinct values, total count, maximum, minimum, average length, and number of nulls.

Numeric columns provide the count of distinct values, total count, maximum, minimum, average value, and number of nulls.

Refresh Synonym (if applicable)

Regenerates the synonym. Use this option if the underlying object has been altered.

Data Management

Followed by these options, if applicable:

Recreate DBMS Table. Recreates the data source table. You are asked to confirm this selection before the table is regenerated. (Note that the table will be dropped and recreated. During the process, data may be lost.)

Delete All Data. Deletes all existing data. You are asked to confirm this selection before the data is deleted.

Insert Sample Data. Inserts specified number of sample records, populating all fields with counter values.

Reorganize. Recreates the data source table preserving original data.

Note: This option is not available in the Web Console.

Impact Analysis

Generates reports on procedures, synonyms, and columns that provide information on the flows/stored procedures available on a particular server, and the synonyms and columns they use. These reports enable you to evaluate changes before they are made by showing which components will be affected. See the Server Administration for UNIX, Windows, OpenVMS, IBM i, and z/OS manual for details about Impact Analysis reports.

Copy

Copies the synonym to the clipboard.

Delete

Deletes the synonym. You are asked to confirm this selection before the synonym is deleted.

Cut

Deletes the synonym and places it on the clipboard.

Properties

Displays the properties of the synonym, including physical location, last modified date, description, and privileges.



x
Reference: Access File Keywords

Keyword

Description

UCI

User Class Identifier for the location of the global data structure.

SEGNAM

Corresponds to the number of segments with data values in a synonym created with default subscript names in the Master File. If a synonym template is create the number of segments is 25.

VOLUME SET 

Volume set name where the global data structures reside.

GLOBAL

Is a table name.

WRITE

Specifies whether write operations are allowed against the table.



x
Data Type Support

All data in DSM Mumps is represented as alphanumeric. The format of the data can be changed manually in the USAGE attribute of the Master File. For example, see the VAL3D field in the previous example.


Top of page

x
Handling Dates

Mumps dates are represented as the number of days that have elapsed since Jan 1841, or its equivalent, Dec 31, 1840. (Mumps does not use Julian date format.)

There are two ways to convert Mumps dates:


iWay Software