Layout information

This section provides options for defining specific layout characteristics, such as the offset of a record layout, as well as different methods for defining record criteria.

Use the options located at the top of the Template Editor to identify if the currently selected template will be used to access segmented data. If your template contains more than one record layout, use the drop-down box to select which record layout to edit.

Offset editing

Entering a value for the offset alters the starting position of the currently selected record type in relation to the actual record data. If an offset value is entered, it will be added to the record length of the Level 01 field and to the starting position of all fields within the record type. The offset value entered must be within the range of -32760 to 32760.

Record criteria

When working with data sets in the File Manager editor, you can use a template to select specific records that you want to use. Depending on the type of template being edited, there are three types of record criteria that can be defined when using the Template Editor. These include Related record identification criteria, Record Identification criteria, and Record Selection criteria. The criteria for these three types can be defined using two different methods, Freeform or by using the "by-field" Build Criteria editor.

Note: Related record identification criteria can only be created using the Build Criteria editor.

Freeform

The first method is to enter freeform REXX expressions in the provided text fields. These expressions take the form #ref comp-op value.

Table 1. Freeform REXX expressions
Freeform REXX expression Description
#ref

A field that returns a value from the current record layout to be used in the expression. Fields are identified using the # symbol, followed by the field reference number, for example #8.

You can also use the value returned by performing a calculation with a number of fields, for example (#5 + #6). To do this, you must embed the calculation within parentheses and use valid arithmetic operators, together with at least one field reference.

Another alternative is to use a REXX function that lists at least one field as an argument, for example MAX(#5,#6,#7).

comp-op

Comparison Operator. A symbol that expresses the way in which the value derived from the field or field calculation is to be compared with value. For example, the ">" symbol represents is greater than". File Manager Integration supports all REXX comparison operators.

value

Any expression that returns a single value to be used in the criteria expression. This can take the form of a string, a numeric value, a field, a calculation that returns a value, or a REXX function.

Logical operators, such as AND (&) and OR (|) can be used to create multiple criteria expressions. Parentheses can be used to control the order of evaluation in calculations and criteria expressions.

Build Criteria editor

The other option is to use the "by-field" Build Criteria editor. The Build Criteria editor makes constructing record criteria easy by using a more structured approach. Using the Build Criteria editor, you can construct complex expressions from a list of fields, comparison operators, AND/OR connectors, and value expressions. The Build Criteria editor can be accessed by selecting the Build Criteria button next to each freeform criteria field.

To create criteria using the Build Criteria editor, perform the following steps.

  1. From the main window located on the left side of the Build Criteria editor, select a field that this criteria will be based on. The list contains all the fields currently defined in the template being edited.
  2. Use the drop-down menu located in the Field section of the editor to select a comparison operator. Use the text box located below the drop-down menu to enter a value that corresponds with the field that you selected in the first step.
  3. If the field you selected in the first step is an array, use the Array Index section of the editor to define an index value. Choose from ANY (default), ALL, or define your own value. If you choose to define the index, enter a numeric value in the text box. For multidimensional arrays, commas should be used to separate values.
    The process can end here or you can continue to enhance your criteria by using the logical AND/OR connectors located at the bottom of the editor to combine multiple criteria into complex expressions. Use the buttons labelled Up and Down to rearrange the order of your expressions.
  4. Select OK to exit the editor when you have finished defining your criteria.