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
────────────────────────────────────────────────────────────────────────────────
 File Manager              Template Repository Update
 Command ===>                                                                   Scroll PAGE

 Resource:
    Name  . . . HLQ.SFMNSAM1(FMNCDATA)                           +
 Template Member and data sets:
    Member  . . FMNCTMPL  
    Data set 1  HLQ.SFMNSAM1                                    
             2                                                          
             3                                                          
             4                                                          
             5                                                          
             6                                                          
 JSON CCSIDs:
    Source  . .     0
    Data  . . .     0
    DBCS  . . .     0
 Processing Options:
    Enter "/" to select option
    _ JSON generic     _ Default data sets   _ Ignore compiler options
    _ View resource    _ Edit template       _ Copybook
    _ Mandatory

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 name, or Db2®, IMS, or CICS® resource name.
Specify Db2® resources in this form:
D2:ssid:location.owner.object
Specify IMS resources in this form:
I1:ssid:DBDname

For resources other than Db2® and IMS generic names are supported, so you can populate the field value from a selection list. For partitioned data sets you must also provide a member name.

Press F10 or F11 to scroll left or right through the field. Press F4 to expand the field.

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, File Manager 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.
JSON CCSIDs
These values are the CCSID values that will be used by File Manager 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.
Source
CCSID of the field names specified in the template.
Data
CCSID of single-byte field values.
DBCS
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": [                                         
    {"CUST-REC":                                        
      {"CUST-ID":"02200",                               
       "NAME":"Graham, Anna"                            
      }                                                 
    } ]                                                 
  } ]  
}
Figure 3. Example 2. Generic JSON format
{"records": [                                           
  {"layouts": [                                         
    {"layout":"CUST-REC"                                
    ,"fields": [                                        
      {"field":"CUST-ID"                                
      ,"type":"AN"       
       "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
────────────────────────────────────────────────────────────────────────────────
 File Manager         Default Template Data sets
 Command ===>                                                                  

    Data set 1  FMN.TEMPLATE                                            
             2  FMN.TEMPLAT2                                            
             3                                                          
             4                                                          
             5                                                          
             6                                                          

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.

For Db2® and IMS resource definitions, default data sets can be defined for each subsystem.

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.
Copybook
Select this option if the template member and data sets refer to a source copybook.
Mandatory
Select this option to make this template mandatory for users to whom the repository is defined as mandatory.
Note: You can test the mandatory usage of a template for a resource by a user where the repository is not mandatory. Enter the command TESTMASK on the View or Edit entry panel. This command toggles the scrambling option which will force the usage of the template and restrict the function to view or browse dialogs.