Detecting the MVS file type

Use the Discover File Type action to determine the type of content in a partitioned data set member, assign a file type extension to it, associate it with a default editor, and enable advanced editing support, such as syntax checking and content assist.

Before you begin

This menu item is helpful for partitioned data sets (PDSs) that do not have a file mapping defined and that contain members with mixed content types.

If you have a partitioned data set named MYUSERID.MIXED.SOURCE, for example, and it contains COBOL source files, copybooks, SQL procedures, REXX procedures, and JCL files, you can use the Discover File Type action to assign file type extensions to each file. If the extensions assigned are associated with a default editor, then that default editor is used to open the file when you edit it. The default editor for PDS members with undefined file mapping is the z Systems® LPEX Editor.

About this task

This menu item is available only for members of partitioned data sets that are not included in any z/OS® File System Mapping definitions. It is not available for sequential data sets, for partitioned data sets (MVS file folders) or for PDS members that already have a file type extension.

Procedure

In the Remote Systems view or z/OS Projects view, select a partitioned data set member. Right-click and select Discover File Type.
Limitations:
Some file types, such as REXX execs, XML files, and Java™ files, might be misidentified or not identified by the scanner. If the scanner misidentifies the file, do these steps:
  1. Select the file in the Remote Systems view.
    Note: The Mapping properties are not available from the z/OS Projects view.
  2. Right-click and select Properties. The Properties window displays.
  3. In the Properties window, select Mapping.
  4. In the Extensions group, select Other and type a file extension in the text box.

Developer for z/OS does not prompt you to create or associate a property group with a file that has no file type mapping.

Results

The file type scanner runs. The message, Set mapping for filename, displays in the status area at the bottom of the workbench. After the file is scanned, the appropriate file type extension is added to the file. Discover File Type supports the following file type extensions:
  • .asm
  • .bms
  • .mfs
  • .c
  • .cpp
  • .h
  • .cbl
  • .cpy
  • .java
  • .jcl
  • .pli
  • .inc
  • .plx
  • .rexx
  • .sql
  • .xml

The scanner also updates the file icon and the file mapping properties, as shown in these before and after screen captures for a COBOL file. Before the Discover File Type action, the file name displays without the extension and with the z Systems LPEX Editor icon ( LPEX Editor icon). The file mapping property for the file extension is Inherit from system mapping (undefined). After the Discover File Type action, the file name displays without the extension and with the COBOL Editor icon ( COBOL Editor icon). The file mapping property for the file extension is Other: cbl.

Item Before After
File name and icon File name and icon before detecting File name and icon after detecting
Mapping properties imageMapping page Mapping page