Suprtool Commands
blanks. String constants are expected for fields of type BYTE, U, or X, but numeric constants are expected for fields of type Z (zoned decimal).
>if field = " " {check for all blanks}
>if field = "XX" {double-quotes are okay}
>if field = 'XX' {so are single-quotes}
If you want to compare for a quote itself, you include two quotes in the string for each quote you want.
>if field = "AB""CD" {look for AB"CD}
Character Constants
Use the ^-character to specify any ASCII character. The number (the actual ASCII value), or letter (^A means control A), must follow immediately after the ^-character.
Suprtool treats character constants as strings. When you compare the constant to a field longer than one byte, Suprtool pads the constant with spaces.
>define field,1,1 {byte field}
>if field = ^0 {binary zero}
>if field = ^G {Control-G (bell)}
>if field = ^27 {escape}
>if field = ^252 {Roman-8 box}
To look for "null values" or "low values" in byte-fields, it is usually sufficient to check the first byte for a binary zero:
>define first-byte,bigfield,1,byte
>if first-byte = ^0
Subscripts
Use subscripts to access individual items in repeated fields, or to access substrings.
Numeric Subscripts
For repeated numeric fields only one index is allowed.
If Table has the form 10J2, it holds ten double integers.
•
Table(1) is the first sub-item.
•
Table is the same as Table(1).
•
Table(5) is the fifth sub-item.
>if table(5) = 23
>if table(2) = 20 or table(4) = 30
>if table(8) = 31 and table(9) = 28
Character Subscripts
Character string fields may have 1, 2, or 3 subscripts after them. Character string fields are allowed more than one subscript value.
If ADDR has the form 5X30, it consists of 5 substrings of 30 characters each.
•
ADDR(1) is the first 30-character sub-item of ADDR.
•
ADDR without subscript is the same as ADDR(1).
•
ADDR(2) is the second 30-character sub-item of ADDR.
Suprtool 5.7 for MPE• 191