z/OS dataset extension mappings
z/OS dataset extension mappings allow users to map z/OS dataset names (and, optionally, member names) to specific editor types when opening with Host Explorer or adding files to a BMC Mainframe Project. This feature assigns file extensions or members based on a name or name pattern.
For example, a dataset whose name satisfies the *.COBOL* or *.COBOL.* character pattern is mapped to the *.cbl file extension. This results in that dataset and its members being associated with the Workbench COBOL Editor because the file association (Window > Preferences > General > Editors > File Associations) for *.cbl is set to the Workbench COBOL Editor. This same character pattern could instead be mapped to a *.txt file extension if the desired file association is a text editor.
Host Explorer contains an initial set of default dataset name pattern/file extension mappings, which are listed under the Default Mapping definition in the z/OS Dataset Extension Mapping Editor. Before any user-created mapping definitions, the Default mappings are referenced by all of the mainframe hosts. Additional mapping definitions can be created and then assigned to individual hosts using the z/OS Dataset Extension Mapping and z/OS Host Mapping Definitions functions.
Maps can be moved or copied between mapping definitions using drag and drop based on the Drag Behavior: Copy check box.
Some general rules to keep in mind:
- z/OS Dataset Extension Mappings support datasets of type: PDS, sequential, DDIO, and Endeavor.
- In Host Explorer, the Assign File Extension option is disabled if more than one type of source is selected (that is, a mix of datasets and members) or if source types are selected across hosts.
- When assigning a file extension, a new file extension mapping will not be created if there is a preexisting mapping entry under the same parent Mapping Definition that has an identical pattern, unless the user explicitly selects the Replace file extension for mapping entries with identical patterns check box.
- The z/OS Dataset Extension Mappings Editor is automatically refreshed/synchronized (if it is open on the active page) when a new dataset extension mapping is successfully added using the Assign File Extension option.
- Using Project Explorer's refresh command on a dataset resource sets that resource's default editor ID to the proposed editor determined by the z/OS dataset extension mapping registry. For example, from the Project Explorer, if the user decides to open a COBOL-based dataset with the default text editor (Open With > Text Editor), then this dataset is automatically set to always opens with this type of editor. If the user wants to switch back to the original proposed editor, they can just right-click on the dataset, and select the Refresh command option -- this resets the editor to be consistent with the dataset extension mapping.
To create a new z/OS dataset extension mapping for datasets or members
- To assign a dataset, member, or PDS to a file type (such as .txt), in the Host Explorer, right-click a mainframe source type(s) (dataset, member, or PDS) and select Assign File Extension. The Assign File Extension dialog box appears with the selected source(s) listed in the Mapping Pattern column. Multi-select functionality allows users to select multiple individual source types or a group of source types.
- In the File extension drop-down list, type or select a file extension (such as c, txt, or cbl) to associate with the selected source type.
- Select a mapping definition template in which to place the new mapping. The default is DEFAULT.
- Click Assign.
To associate a particular host to a mapping definition
- From the Configure menu, select z/OS Dataset Extension Mapping Editor. The z/OS Dataset Extension Mapping Definition view appears.
- If not already selected, select the z/OS Host Mapping Definitions tab (located at the bottom). The z/OS Host Mapping Definitions panel displays.
- From the from the z/OS Hosts tree, select the host you want to associate with a particular mapping definition. The Host Mapping Definition panel displays with the Host URI field populated with the selected host.
- From the Mapping definition drop-down list, select the mapping definition to be associated with the host URI.
To create a new mapping definition
- From the Configure menu, select z/OS Dataset Extension Mapping Editor. The z/OS Dataset Extension Mapping Definition view appears.
- If not already selected, select the Mapping Definitions tab (located at the bottom). The z/OS Dataset Extension Mappings Definition panel appears.
- Click New Definition. The New Dataset Extension Mapping Definition dialog box appears.
- Enter a name for the mapping definition in the Mapping definition name field.
- From the Mapping definition template drop-down list, select a mapping definition template to be used as a basis for the new mapping definition. The drop-down list shows any previously established mapping definitions and the DEFAULT template.
- Click OK.