Field variables
A field variable is a type of string variable. It holds a string, just as a string variable does, and you can use it in any context in which a string variable is valid.
However, a field variable differs from a string variable in the
way in which a string is stored into the field variable. The string
that a field variable contains is always a string that the macro runtime
reads from a 3270 or 5250 field in the current session window. To
get the macro runtime to read this string from the 3270 or 5250 field,
you have to create a Variable update action that specifies:
- The name of the field variable (such as $fldFilename$).
- A location string (a string containing a pair of integers separated
by a comma, such as
'5,11')
.
- Looks in the session window at the row and column value specified by the location string.
- Finds the 3270 or 5250 field in which the row and column value is located.
- Reads the entire contents of the field.
- Stores the entire contents of the field as a string into the field variable.
For more information, see Variable update action with a field variable.