Creating and uploading data files

Some input parameters to the z/OS® source code application require a data file. Data files must be created on the local workstation and copied in binary format to a directory in z/OS UNIX System Services.

Learning about data files

Table 1 shows the types of data files and the input parameter for which each type of data file is needed:
Table 1. Data files
Data file type File extension Description Required Parameter in the start procedure
Rule file .dat Code review rules. Yes. RULES
CCR file .ccr Definitions of custom code review rules. If you use any custom code review rules. CUSTRULE
z/OS File System Mapping file1 .zip An archive of z/OS file system mappings. If you use any nondefault z/OS file system mappings. EXTMAP
Property group file2 .xml SYSLIB entries for copybooks and include files. If you use any copybooks or include files. PROPERTY
1You do not need a mapping file if you plan to use the LIST parameter when you run the code review application on z/OS.
2You do not need a property group file if you plan to use the SYSLIB parameter when you run the code review application on z/OS.
No additional data files are needed for baseline analysis configurations. The code review application for z/OS creates the baseline archive.

Copying data files to z/OS UNIX System Services

After you create the data files, copy them in BINARY format to a directory or directories in z/OS UNIX. To use the data files as input parameters to the code review application, see the documentation in the prolog of the code review start procedure on z/OS.

Creating a rule file

About this task

A rule file contains a set of code review rules to be applied by the z/OS code review application. The application requires a rule file to be specified. A rule file can include built-in rules, custom rules, and user-written rules. It can contain both COBOL and PL/I rules, in case the code review analysis targets both COBOL and PL/I source code files.

Procedure

To create a rule file, follow these steps:

  1. Open the software analysis configuration window and select the configuration that contains the rules to be included in the rule file.
  2. On the Rules tab, select the rules.
  3. Click Export. Follow the steps in the wizard to export the rule information into a .dat file.

Results

The rule file is created.

Creating a CCR file

About this task

A CCR file contains custom rules and categories. It is not required for running the z/OS code review application unless the rule file includes custom rules and categories.

Procedure

To create a CCR file, follow these steps.

  1. From the main menu click Window > Preferences > Software Analyzer > Custom Rules and Categories.
  2. Click Export.
  3. Follow the steps in the wizard to export the custom rules and categories into a .ccr file.

Results

The CCR file is created.

Creating a z/OS File System Mapping file

About this task

You do not need a mapping file if you plan to use the LIST parameter when you run the code review application on z/OS.

A z/OS File System Mapping file contains mappings that are exported from the z/OS File System Mapping view. A z/OS File System Mapping file is not required for running the z/OS code review application unless the data sets that you analyze have nondefault file system mappings.

At run time, the z/OS code review application checks the low-level qualifier of each data set that it processes. If it finds a match in the file system mappings, then it processes the data set. If not, then it skips the data set.

The default action is that the z/OS code review application searches the default file system mappings. If a z/OS File System Mapping file is specified, the application searches the mapping file rather than the default mappings.

Procedure

To create a z/OS File System Mapping file, follow these steps:

  1. Open the z/OS File System Mapping view by clicking Window > Show View > Other > z/OS Project Views > z/OS File System Mapping.
  2. On the toolbar, which is in the upper-right corner of the view, click the down arrow and then click Export Mappings.
  3. Follow the steps in the wizard to export the custom rules and categories to an archive file with the file extension .zip.

Results

The z/OS File System Mapping file is created.

Creating a property group file

About this task

You do not need a property group file if you plan to use the SYSLIB parameter when you run the code review application on z/OS.

Note: A statement in this subtopic that refers to a COBOL copybook applies also to PL/I include files.

A property group file contains the names of data sets that you want to be searched to resolve references to copybooks. A property group file is not required for running the z/OS code review application. However, if the application cannot resolve a reference to a copybook, it does not process the copybook.

At run time, the z/OS code review application handles qualified copybook references and unqualified copybook references differently:
  • For qualified references, such as COPY MYCPYBK IN CPYLIB, the application searches a list of data sets that you specify in the Additional JCL property of the compilation step in the property group file.
  • For unqualified references, such as COPY MYCPYBK, the application first searches the list of data sets that are provided for qualified references. If the copybook is not found, the application searches a second list of data sets. You specify the second list in the SYSLIB property of the local compiler options in the same property group file.
  • If the copybook is not found, the z/OS code review application does not process the copybook.

Procedure

To specify data sets for qualified or unqualified copybook references in a property group file, follow these steps. Use the same property group file for qualified references and unqualified references.

  1. Open the Property Group Manager view.
  2. Open or create a property group for a remote system.
  3. In the Property Group editor, click the PL/I or COBOL tab.
  4. Specify data sets that you want to be searched for qualified and unqualified copybook references. To do these tasks, see the following links: Use the same property group for qualified references and unqualified references.
  5. Save your work and close the editor.
  6. In the Property Group Manager view, right-click the property group and click Export. Follow the steps in the wizard to save the property group to a file.

Results

The property group file is created.

Adding data sets for qualified copybook references

About this task

Note: A statement in this subtopic that refers to a COBOL copybook applies also to PL/I include files.

Procedure

To specify data sets to be searched for qualified copybook references, follow these steps:

  1. In the Property Group editor, click the COBOL or PL/I tab.
  2. In the list of language settings, which is on the left side, click Procedures and Steps.
  3. In the Procedures and Steps pane, which is on the right side, click the compilation step. In the Additional JCL field, enter data definition (DD) statements. For example, if the qualified COPY statement is COPY MYCPYBK IN CPYLIB, you might add the following data definitions:
    //******* ADDITIONAL JCL FOR COMPILATION HERE ******
    //CPYLIB   DD DSN=USER.COBOL.COPYLIB1,DISP=SHR
    //         DD DSN=USER.COBOL.COPYLIB2,DISP=SHR 
  4. Save your work. Return to Creating a property group file and continue with Step 4.

Results

At run time, the code review application scans the contents of the Additional JCL property for a DD name that matches the qualifier library. It then scans the data sets defined for the DD name. If the application does not find the copybook name, it does not process the copybook.

Adding data sets for unqualified copybook references

About this task

Note: A statement in this subtopic that refers to a COBOL copybook applies also to PL/I include files.

Procedure

To specify data sets to be searched for unqualified copybook references, follow these steps:

  1. In the Property Group editor, click the COBOL or PL/I tab.
  2. In the list of language settings, which is on the left side, click Local Compiler Options.
  3. In the Local Compiler Options pane, which is on the right side, in the SYSLIB field, enter the name of each data set that you want to be searched for copybooks. Use spaces to separate data set names.
  4. Save your work. Return to Creating a property group file and begin Step 5.

Results

At run time, the code review application first searches the data sets that are specified for qualified copybook references. If the copybook is not found, the application searches the data sets that are specified in the SYSLIB property. If the application does not find the copybook name, it does not process the copybook.

Feedback