Retrieving data from external sources (Scripting)
The REXX EXECIO function allows data to be read from external sources. In a single statement, REXX can read an entire data set and place the records in a set of variables with a common prefix, or stem, plus one variable per record.
The data can be parsed using one or many of the REXX parsing functions such as PARSE. The following example reads in a set of user IDs and passwords from the DD name DDUSERS and places the values in USER.n and PASSWORD.n. The user IDs and passwords are placed in a data set in free format, with one user and password per record, separated by one or more spaces.
DO I=1 TO INPUT.0
PARSE VAR INPUT.I USER.I PASSWORD.I
END
Retrieving screen data
Screen data can be retrieved from a screen using Performance Test variables. The SCREEN variable contains a copy of the current screen image. Portions of the screen can be extracted using functions such as SUBSTR. The contents of the screen can be examined and searched using standard functions such as POS.
For example:
retrieves 32 characters of screen data located in row 0, column 24, and places them in the TITLE variable.
Comments
A comment can be introduced in two ways:
- Text enclosed in /* … */ is considered to be a comment. To begin a comment, use the characters /*. End the comment with the characters */.
- A record that begins with the asterisk (*) character in column 1 is considered to be a comment statement.
Examples
IF A=B THEN /* Set ’a’ to the value in ’b’ */
* This entire line is regarded as a comment.