Updating a template from a copybook (U)

If you have made minor changes to the copybook on which a template was based, you can update the template to reflect these changes.

Minor changes that the update process supports include:
  • Changing field names without changing field data types
  • Changing field data types without changing field names
  • Changing the order of fields in a record
  • Deleting unreferenced fields
  • Inserting new fields
  • Changing record length
  • Changing the number of occurrences of fields in an array (table)
Major changes that might cause the update process to produce unwanted results include:
  • Changing field names and field data types
  • Changing field names and the order of fields in a record

If the template contains record identification criteria or record selection criteria, then the update process adjusts the field reference numbers in the criteria to reflect any changes in the field order.

However, if the criteria refer to a field that has been deleted in the copybook, then the update process displays the Field Selection/Edit panel, with references to deleted fields changed to “#0”. Edit the criteria, removing or replacing the obsolete field references, then press the Exit function key (F3) to continue with the update process.

If you change the data type of a field to a dissimilar data type (for example, numeric to non-numeric, or vice versa), then the update process discards any field attributes that you might have defined for that field (such as create attributes).

To update an existing template from a copybook:

Note: File Manager ignores the Copybook: Data set name field and instead uses the data set names which were used to create or update the template.

Copybooks can be stored in PDS, PDSE or CA-Panvalet libraries.

  1. In the Data set name field in the Template section, type the name of the data set, in which the template you want updated is stored.

    Templates can be stored in PDS or PDSE data sets but not in a CA-Panvalet library, or a library accessed using the Library Management System Exit.

  2. In the Member field of the Templates section, type the name of your template or specify blanks or a pattern for the member name.
  3. On the Command Line, type the U command and press Enter.

    File Manager takes you to the advanced copybook selection process on the existing source definition for the specified template. When you press the Exit function key (F3), File Manager updates the template. A message is displayed in the upper right corner of the panel, to indicate the success or failure of the process.

You must specify the PDS member name of the copybook you want to use, and the data set name or PDS member name of the template you want to update. The copybook you specify is validated by compiling it with the compiler. For a description of the compilation process, and information about what you can do if errors occur, see Data description support.