$return = GetField(string,field#[,separator])
|$return||receives the field read from the string.|
|string||is the string containing the field to be extracted.|
|field#||is the field number to extract.|
|separator||is the single character field separator. The default is a comma. If coding a comma it should be enclosed in double quotes.|
string, field# and separator may be variables.
The GetField command extracts a field from a field-separated string and copies it into a script variable.
$Field = GetField("The quick brown fox",2," ")
$Field = GetField("The,quick,brown,fox",2,",")
' Sample script to extract fields
$String = "The quick brown fox"
$FieldNumber = 1
$Fields = 4
$Field = GetField($String,$FieldNumber," ")
$FieldNumber = $FieldNumber + 1
if $FieldNumber < $Fields then GoTo LOOP:
TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.