Dynamic Template panel

The Dynamic Template panel is used to define fields and set record selection criteria within a dynamic template (see Creating dynamic templates).

Panel and field definitions

Figure 1. Dynamic Template panel
  Process   Options   Help
 ───────────────────────────────────────────────────────────────────────────────
 File Manager              Dynamic Template                        Line 1 of 23

 1 Edit template field attributes and selection

 Cmd Con (  Start  Length Type  Op  Value                                      )
     <-> - <---->  <---->  <>   <-> <---+----1----+----2----+----3----+----4-- -
 *** ****  Top of data  ****
                                                                               
     AND                                                                       
     AND                                                                       
     AND                                                                       
     AND                                                                       
     AND                                                                       
     AND                                                                       
     AND                                                                       
     AND                                                                       
     AND                                                                       
     AND                                                                       
     AND                                                                       
     AND                                                                       
  F1=Help      F2=Split     F3=Exit      F4=CRetriev  F5=RFind     F6=RunTemp
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel 
Cmd
Prefix command area - used to enter a template editor prefix command.
Con
Connectors - used to specify the AND/OR connectors. These are only relevant to lines containing record selection expressions. The default value is AND. You can overtype the connectors with any of the following values:
Value entered
Resultant value
AND
AND
&
AND
OR
OR
|
OR
Note: Abbreviations are accepted. For example, overtype AND with O and it is changed to OR.
(
Left Parenthesis - Parentheses must only be used on lines containing expressions. They are used to group record selection criteria. The number of left parentheses must match the number of right parentheses.
Start
An editable field in which you can enter or edit a field's starting column number. This must be between 1 and the record length or, if you specify a + sign optionally followed by an offset number (default zero), the start location is calculated as:
(previous field start) + (previous field length) + offset

For example, +0 starts at the next contiguous location and +4 starts 4 bytes past the next contiguous location.

Length
An editable field in which you can enter or edit the length of a field. For most fields, this can be from 1 to the maximum length dictated by the record but the Start value plus the Length of the field should not exceed the record length. Restrictions apply for some field types:
If the Type is:
then Length must be:
BI
2, 4 or 8
FE
> 6 and < 24. The precision is the length minus 6. The scale is the precision minus 1. Graphic and DBCS strings must be an even number of bytes.
FP
4 or 8
PD
between 1 and 16
ZD
between 1 and 32
Type
An editable field in which you can enter or edit the data type of a field. This must be one of:
AN
Alphanumeric
AX
Alphanumeric displayed in long hexadecimal.
B
Binary
BI
Binary
BT
Bit string
C
Alphanumeric
DB
DBCS string
FE
Floating point (external)
FP
Floating point (internal)
G
Graphic string
P
Packed decimal
PD
Packed decimal
VB
Varying bit
VC
Varying character
VD
Varying DBCS
VG
Varying graphic
Z2
Null-terminated varying-length(VARYINGZ) DBCS string
ZA
Unsupported zoned decimal edited
ZC
Varying character null terminated
ZD
Zoned decimal
ZG
Varying graphic null terminated
Field Name
An editable field in which you can enter or edit the field names in your dynamic template. The name can consist of any characters, including spaces, up to a maximum of 35.

If the Start, Length and Type fields are filled in but the Field Name is left blank, a name is generated in the form @@DTnn where nn is the field number. The name is generated either on exit or when you perform a template edit. Existing field names taking the form @@DTnn are regenerated to ensure nn always reflects the current field number.

Note: If you are running a screen width of 115 or greater, the Field Name field can be displayed at the same time as the Start, Length and Type fields. However, at any width less than this, you need to toggle the display between Field Name and Start, Length and Type. The default is to display Start, Length and Type. To toggle the display, ensure that your cursor is not in a Value field and press the Right function key (F10) or Left function key (F11).
Op
Operator - used to create record selection expressions. Valid operators are:
=, EQ
True if the terms are equal (numerically or when padded)
\=, ¬=, /=, NE
True if the terms are not equal (inverse of =)
>, GT
Greater than
<, LT
Less than
><, <>
Greater than or less than (same as not equal)
>=, GE
Greater than or equal to
\<, ¬<
Not less than
<=, LE
Less than or equal to
\>, ¬>
Not greater than
==
True if terms are strictly equal (identical)
\==, ¬==, /==
True if the terms are NOT strictly equal (inverse of ==)
>>
Strictly greater than
<<
Strictly less than
>>=
Strictly greater than or equal to
\<<, ¬<<
Strictly NOT less than
<<=
Strictly less than or equal to
ACO
Contains all of the values specified. Matching case sensitive. The negative form is XCO.
ACU
Contains all of the values specified. Matching not case sensitive. The negative form is XCU.
CO
Contains one of the values specified. The negative form is ¬CO.
CU
Contains one of the values specified. Matching not case sensitive. The negative form is ¬NC.
NC
Numeric contains - a number is one of the values. The negative form is ¬NC.
NN
(Same as ¬NU.) Field does not contain a valid numeric for the field type. The positive form is NU.
NR
Not in range - field < value1 or field > value2. The positive form is RG.
NU
Field contains a valid numeric for the field type:
Field type
Test for being valid numeric
BI, FE, FP, PD, and ZD
Checked against the field definition
Other
Recognized as numeric if the display value or character value the field contains is a valid number. The valid number can contain anything that is valid for a floating-point external or decimal number. For example:
-1234.55
+3.4621E+10
The negative form is ¬NU.
RG
Range - value1 >= field <= value2. The negative form is NR.
XCO
Does not contain all of the values. Matching case sensitive. The positive form is ACO.
XCU
Does not contain all of the values specified. Matching case sensitive. The positive form is ACU.
¬CO
Does not contain one of the values specified. The positive form is CO.
¬CU
Does not contain any of the values specified. Matching not case sensitive. The positive form is CU.
¬NC
Does not contain the specified number(s). The positive form is NC.
¬NU
(Same as NN.) Field does not contain a valid numeric for the field type. The positive form is NU.
VER
Verify this field is composed only of characters specified in the Value column.
Value
Use this field to provide a character or numeric constant to be used for comparison in the expression. If the operator supports more than one value (for example, RG, CO) then use comma delimiters to provide separate values.

You can use up to 255 characters in this field, and use the Left and Right primary commands or function keys to scroll within the field.

When specifying values, the following rules apply:

Hexadecimal strings
A hexadecimal string must be in the form 'hhhhhh'x or x'hhhhhh'. The value enclosed in quotation marks must be an even number of characters and contain valid hexadecimal characters. (0123456789ABCDEF).
Binary strings
A binary string must be in the form 'nnnnnn'b or b'nnnnnn'. The value enclosed in quotation marks must be a combination of 0 and 1s.
Numeric Operands
The value(s) specified for a numeric field type must be a valid number. Quoted values are not accepted.
Character strings
For non-numeric types the value is automatically enclosed in quotation marks if you do not specify them. When specifying more than one value for operations other than RG and NR you must provide quotation marks for all the comma delimited values
Date strings
A date string must be in the form d’xxxxxxxx’. The string must be specified in the output format defined for the field.
The following is an example of a date value:

      d'Jan 01, 2014'
where the output format is:

      Mmm DD, YYYY
Time strings
A time string must be in the form t’xxxxxxxx’. The string must be specified in the output format defined for the field.
The following is an example of a time value:

      t'15:30:00.000'
where the output format is:

      HH:MI:SS.999
Note:
  1. Date and time strings cannot be used with contains operators.
  2. When used with range operators requiring two values the second value should be quoted, for example, d'Jan 01, 2014','Dec 01, 2014'
  3. Use d'=' or t'=' to retrieve the current date or time value in the output format.
)
Right Parenthesis - Parentheses must only be used on lines containing expressions. They are used to group record selection criteria. The number of left parentheses must match the number of right parentheses.

Parent panels

Child panels

  • The display panel that would normally result from your starting Entry panel.

Equivalent functions

  • None.

Related tasks and examples