Previous Topic: Represent Screen DataNext Topic: Search the Current Field for a String


Represent Location of the Screen Data

The variable &LOC represents the position of the screen data that is found as a result of a SEARCH statement.

For example, suppose the following statement is used in an ACL/E program:

SEARCH 'ENTER USERID'

If the statement finds the target string, the variable &LOC will contain the value of the screen position of the first character of the target string.

ACL/E also has variables that represent the column and row of the target string. These are &LOCCOL and &LOCROW. So if the string "ENTER USERID" starts in column 5 of row 2, the value of &LOC is 85 (80 in the first row and 5 in the second), the value of &LOCCOL is 5, and the value of &LOCROW is 2.

The data from the position indicated in &LOC to the end of the field that contains the search data is &SCRNFLD. For example, the user ID field on an application screen may contain more than just the string "ENTER USERID". It may also contain other characters so that the entire field looks something like this:

ENTER USERID ====>

In this case, the value of &SCRNFLD would be all of the characters from the first character in the field (the first letter "E") to the last character in the field (the character ">").