Topics: |
When the server accesses a data source, it needs to know 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 RMS data types.
You can create metadata:
Both methods describe data files to the server for OpenVMS with a Master and an Access File.
The Master File describes the type of data file you are using, the structure, and the fields it contains. The Access File provides a number of attribute parameters, including SHARED ACCESS to support READ/WRITE capabilities and an RMSFILE attribute, which offers one method for associating the data source with the Master File. For details about Access File uses, see When to Use an Access File With an RMS Data Source.
How to: |
Reference: |
Synonyms define unique names (or aliases) for each RMS table or view that is accessible from the server. Synonyms are useful because they hide the underlying data source location and identity 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 allowing 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 an Access File, which represent the server metadata.
The Applications page opens.
The Connect to Data page opens.
Depending on the type of adapter you chose, one of the following options appears on the context menu.
The button may be labeled Next, Create Synonym, Create Base Synonyms, Create Cluster Synonym, or Update Base Synonyms.
The synonym creation process for most adapters has been consolidated so that you can enter all necessary parameters on one page. However, for some adapters such as LDAP, you must click Next buttons until you get to a page that has a Create Synonym button.
The synonym is created and added under the specified application directory.
Note: When creating a synonym, if you choose the Validate check box (where available), the server adjusts special characters and checks for reserved words. For more information, see Validation for Special Characters and Reserved Words.
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 potential candidates for synonyms:
You can base your synonym on either CDD definitions or COBOL definitions. Choose one of these options from the drop-down list.
Next, you must specify the locations of either the CDD or COBOL definitions. Options vary depending on the selection you make here.
For related information about COBOL File Descriptions, see Translating COBOL File Descriptions.
For CDD definitions:
If your repository is in a non-standard location (that is, one which is not declared by CDD$DEFAULT), you can supply the CDD location here.
If CDD$DEFAULT is declared, its current value appears in the input box, where you may leave it as is or change it.
Type a filter for retrieving a partial list of CDD references (for example, those starting with V%).
You must supply filter values in uppercase characters, followed by a % sign. OpenVMS wildcards are not permitted.
For COBOL definitions:
Specify a full path directory name where the COBOL definitions are located. (Wild card characters are not permitted.)
For information about specific layout and syntax requirements, see COBOL FD Syntax Requirements.
If you wish to limit retrieval, you can type a file name and/or file extension:
You must supply filter values in uppercase characters.
Location of RMS data files:
Specify a full path directory name where RMS is located. This may be a logical that points to the full directory path or a directory path that uses a logical. OpenVMS wildcards are not allowed.
Type a filter for retrieving a partial list of RMS file names in the directory (for example, those starting with V%).
You must supply filter values in lowercase characters, followed by a % sign. OpenVMS wildcards are not allowed.
Type a filter for retrieving a partial list of RMS files based on the file extensions within the directory.
The normal default for RMS files, dat%, is pre-populated in the input box and must not be changed if you wish to search for .dat files.
You can change the .dat value by specifying a filter to access files that do not use the RMS normal default (that is, those starting with rms%). You must supply filter values in lowercase characters, followed by a % sign. OpenVMS wildcards are not allowed.
Click this button to obtain the selection list of candidates for which synonyms can be created.
Select actual candidates for synonyms:
Select an application directory. The default value is baseapp.
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.
Tip: While you can change individual names in the list, entering a prefix or suffix enables you to make global changes that are particularly useful when many synonyms are being created.
An alternate method for dealing with duplicate names is to store them in separate application directories and change the application path as needed for a particular table.
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.
For a COBOL FD, optionally, select Customize COBOL FD conversion options to customize how the COBOL FD is translated. If you do not select the check box, default translation settings are applied.
For more information, see Customization Options for COBOL File Descriptions.
Select the Validate check box if you wish to convert all special characters to underscores and perform a name check to prevent the use of reserved names. (This is accomplished by adding numbers to the names.) This parameter ensures that names adhere to specifications. See Validation for Special Characters and Reserved Words for more information.
When the Validate option is unchecked, only the following characters are converted to underscores: '-'; ' '; ' \'; '/'; ','; '$'. No checking is performed for names.
Select the Make unique check box if you wish to set the scope for field and group names to the entire synonym. This ensures that no duplicate names are used, even in different segments of the synonym. When this option is unchecked, the scope is the segment.
For CDD definitions:
This column displays the name that will be assigned to each synonym. To assign a different name, replace the displayed value.
To select all CDD records in the list, select the check box to the left of the Default Synonym Name column heading.
To select specific records, select the corresponding check boxes.
In the list of CDD objects and data files, use the pull-down menu on the right to associate the CDD record with the physical data file.
For COBOL definitions:
This column displays the name that will be assigned to each synonym. To assign a different name, replace the displayed value.
To select all COBOL records in the list, select the check box to the left of the Default Synonym Name column heading.
To select specific records, select the corresponding check boxes.
In the list of COBOL objects and data files, use the pull-down menu on the right to associate the COBOL record with the physical data file.
To generate the following synonym from the Web Console or the Data Management Console Create Synonym panes:
Tip: If you wish, you can choose a different data file at a later time using a FILEDEF, as described in Associating an RMS Data Source to a Master File.
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
Generated Master File:
FILENAME=RMSCAR, SUFFIX=RMS , DATASET=TSCQDATA:[TSCQDATA.RMS]rmscar.dat, $ SEGMENT=ROOT, SEGTYPE=S0, $ GROUP=ROOT, ALIAS=E2, USAGE=A62, ACTUAL=A62, $ GROUP=PRIMARYKEY, ALIAS=KEY, USAGE=A50, ACTUAL=A50, $ FIELDNAME=COUNTRY, ALIAS=E3, USAGE=A10, ACTUAL=A10, $ FIELDNAME=CAR, ALIAS=E4, USAGE=A16, ACTUAL=A16, $ FIELDNAME=MODEL, ALIAS=E5, USAGE=A24, ACTUAL=A24, $ FIELDNAME=BODYTYPE, ALIAS=E6, USAGE=A12, ACTUAL=A12, $ FIELDNAME=SEATS, ALIAS=E7, USAGE=I8, ACTUAL=I4, $ FIELDNAME=RETAIL_COST, ALIAS=E8, USAGE=I8, ACTUAL=I4, $ FIELDNAME=DEALER_COST, ALIAS=E9, USAGE=I8, ACTUAL=I4, $ FIELDNAME=SALES, ALIAS=E10, USAGE=I8, ACTUAL=I4, $
Generated Access File:
ACCESS=SHARED, $
To generate the following synonym from the Web Console or the Data Management Console Create Synonym panes:
Tip: If you wish, you can choose a different data file at a later time using a FILEDEF, as described in Associating an RMS Data Source to a Master File.
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
Generated Master File:
FILENAME=RMSCAR, SUFFIX=RMS , DATASET=TSCQDATA:[TSCQDATA.RMS]rmscar.dat, $ SEGMENT=ROOT, SEGTYPE=S0, $ GROUP=PRIMARYKEY, ALIAS=KEY, USAGE=A50, ACTUAL=A50, $ FIELDNAME=COUNTRY, ALIAS=COUNTRY, USAGE=A10, ACTUAL=A10, $ FIELDNAME=CAR, ALIAS=CAR, USAGE=A16, ACTUAL=A16, $ FIELDNAME=MODEL, ALIAS=MODEL, USAGE=A24, ACTUAL=A24, $ FIELDNAME=SEATS, ALIAS=SEATS, USAGE=P7, ACTUAL=I4, $ FIELDNAME=RETAIL_COST, ALIAS=RCOST, USAGE=P7, ACTUAL=I4, $ FIELDNAME=DEALER_COST, ALIAS=DCOST, USAGE=P7, ACTUAL=I4, $ FIELDNAME=SALES, ALIAS=SALES, USAGE=P7, ACTUAL=I4, $
Generated Access File:
ACCESS=SHARED, $
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 available options.
For a list of options, see Synonym Management Options.
WebFOCUS | |
Feedback |