Go to the first, previous, next, last section, table of contents.


Equates

For each pattern that matched the given reversed equate expression is executed. If there is none then the pattern matches by default. If the equate expression leaves no value on the stack then it is assumed to be true, however if it does leave a value on the stack then the value is interpreted as a boolean type, only if it is true does the pattern match. This facility allows more complex work to be done to further control the patterns that match. Some additional system variables can be used within the equate. These are _eq_pat, which has the sequence of characters the pattern matched. The following variables, _eq_pfn, _eq_pfl, and _eq_pft can be used to set the name, length, and type of the field respectively. By default each field is named numerically, with a length equal to the length of the longest value of the field in the input and with a string type. However, for a pattern that matches a field (ie. returns the <sof>) token then these can be used to set these attributes explicitly, as in the example below.

"\"field1\">>_eq_pfn 32>>_eq_pfl 78>>_eq_pft"
"<<_eq_pat\"abc\"="

Note that for the type the ascii character value of C, N, D, or B must be used to indicate the string, numeric, date, or logical types for a field. The field will be created with the values given, so that for example if an input sequence exceeds the field length then it will be truncated. The second equate shows a boolean value being returned so that the pattern will only match if it matches the sequence abc.


Go to the first, previous, next, last section, table of contents.