Insert or update repository entries

The Template Repository Update panel is used to insert or update repository entries.

This panel is displayed to enter the first repository entry or when you use a line command on the Template Repository Resource List panel to edit or insert a new entry. The repository will be updated when you press F3 with a valid resource and associated template. You can rename a resource by overtyping the existing name to a name that doesn’t yet exist.

Figure 1. Template Repository Update panel
  Process   Options   Help
 Z Data Tools              Template Repository Update
 Command ===>                                                                   Scroll PAGE

    Name  . . . HLQ.SHFMSAM1(HFMCDATA)                           +
 Template Member and data sets:
    Member  . . HFMCTMPL  
    Data set 1  HLQ.SHFMSAM1                                    
    Source  . .     0
    Data  . . .     0
    DBCS  . . .     0
 Processing Options:
    Enter "/" to select option
    _ JSON generic     _ Default data sets   _ Ignore compiler options
    _ View resource    _ Edit template

Field descriptions

Resource Name
This field is the key that will be used to look up the repository. The value must be the name of a valid data set, path, MQ queue, or CICS resource. Generic names are supported so you can populate the field value from a selection list. Press F10 or F11 to scroll left or right through the field. Press F4 to expand the field.

For partitioned data sets you should provide a member name as shown in Figure 1.

If the resource name is changed and the new name does not exist, the previous resource name will be renamed. If the new name exists then the panel values will be changed to reflect the existing entry.

Template Member
(Required) If any data sets are specified, the template member must exist in at least one of them. The data sets are concatenated and searched in the order in which they are specified in the fields Data set 1 through 6.

If no data sets are specified in Data set 1 through 6, the repository default data sets are used to locate the template (see option Default data sets). You can enter a generic value to select from a member list of either the data sets specified on the panel or the default data sets.

Tip: Specify a member that is a template, not a copybook. If the member name refers to a copybook, Z Data Tools will attempt to build it, and the associated compiler language and options for the current user will be saved in the repository to enable successful compilation of the copybook when it is later accessed using the repository. If copybooks are stored in the repository, ensure that all associated SYSLIB data sets are accessible by the repository users.
Template data sets 1 - 6
Up to six data set names can be specified per entry. The template member must exist in at least one of the specified data sets. Entering generic names will select from a list. If more than one data set is specified, then they must have like attributes as they will be concatenated in order when loading the template.
These values are the CCSID values that will be used by Z Data Tools to produce JSON. The JSON contains field names, single-byte field values and double-byte field values that are converted to UTF-8. The CCSIDs below are used as the "from" CCSID for the conversion routines. if these values are left as zero they will default to the keyword or system installation values.
CCSID of the field names specified in the template.
CCSID of single-byte field values.
CCSID of double-byte field values.
Processing options
Type / to select each option.
JSON generic
Select this option to produce JSON in a generic format instead of the default specific format:
Figure 2. Example 1. Specific JSON format
{"records": [                                           
  {"layouts": [                                         
       "NAME":"Graham, Anna"                            
    } ]                                                 
  } ]  
Figure 3. Example 2. Generic JSON format
{"records": [                                           
  {"layouts": [                                         
    ,"fields": [                                        
       "NAME":"Graham, Anna"           
    } ]                                
  } ]                                  
Default data sets
Select this option to view or change the default template data sets for the repository.
Figure 4. Default Template Data sets panel
  Process   Options   Help
 Z Data Tools         Default Template Data sets
 Command ===>                                                                  

    Data set 1  HFM.TEMPLATE                                            
             2  HFM.TEMPLAT2                                            

Up to six data sets of like attributes can be specified. These data sets will be used to locate the template member if no data sets are specified on the Template Repository Update panel.

Ignore compiler options
Select this option to ignore any existing compiler options for the current entry. This option is only relevant when updating an existing repository entry that referred to a copybook and a change is being made such that the new member is a template or a copybook that requires different compiler options.
View resource
Select this option to view the resource with the associated template.
Edit template
Select this option to edit the specified template.