Setting your template processing options

Z Data Tools goes through the compilation process whenever you create a template from a copybook, even if you have already successfully created other templates from the same copybook, and whether you are creating a temporary template while viewing data, or creating a permanent template using the Template Workbench.

You can customize the way that Z Data Tools compiles templates by changing your template processing options. You are able to choose whether Z Data Tools detects the programming language that you are using in your copybooks and then automatically selects the appropriate compiler, or whether you want to force Z Data Tools to always use one type of compiler. You can also set the processing options for the COBOL, HLASM, and PL/I compilers.

If you are creating a new template from an existing template model (using the CM command on the Template Workbench (option 7) panel), Z Data Tools does not perform a compilation.

When you specify a copybook in a panel, batch job, REXX procedure or other function, Z Data Tools:

  1. Checks whether the copybook is a complete source program or contains only field definitions.

    If the copybook is not a complete program then Z Data Tools includes the copybook in a shell program.

  2. Invokes the compiler to check the syntax of the copybook, and to produce an ADATA file.
    You can use the Compiler Language Selection panel to:
    • Specify which compiler Z Data Tools is to invoke, or whether Z Data Tools is to automatically detect whether the language is COBOL or PL/I, and invoke the appropriate compiler.
    • Override the compiler options stored in the template.

    You can specify the acceptable return code level for the compilation in the language processing options panels.

  3. If the compilation completes without errors, then Z Data Tools processes the information in the ADATA file to create a template.

    If the compilation completes with a return code of greater than the specified maximum:

    • If you are using Z Data Tools under ISPF, then a pop-up menu is displayed. From the pop-up menu you can:
      • View the compilation listing using Print Browse (option 3.9).
      • Abort the template creation process.
      • Retry the compilation. Before you select this option, view the compilation listing and correct any errors in the copybook. While you are viewing the compilation listing, you can use the ISPF split screen facility to swap to another ISPF session and use your editor to correct the errors in the copybook.
      • Ignore the errors and proceed with creating the template. This option is only available if Z Data Tools is able to create a template. Some compilation errors, such as warnings, might have no effect on the creation of the template. If you are unsure, you can view the compilation listing. If the compilation error is too severe, Z Data Tools cannot create a template.
      • Try the compiler for the other language.
    • If you are using a Z Data Tools function in a batch job, REXX procedure or TSO clist, then Z Data Tools issues the error message “Copybook Compilation Errors Occurred RC=nn”. The batch job, REXX procedure or TSO clist continues as if you had not specified a copybook.

Related topics