Previous Topic: SET StatementNext Topic: COMPARE and BRANCH Statements


KEY Statement

The following KEY statement copies the data from the array element to the current line in the data set member:

KEY &DATA(&A1)(1,70)

The first time this loop is executed, the program copies the data in the array element &DATA(1), and the second time the loop is executed, it copies the data in &DATA(2), and so on.

Because ISPF displays only 72 columns of text on one line, the program copies only 70 characters of the screen data from each array element. However, ISPF does allow you to scroll right and left with the PF keys, so think about what statements you would need to add to copy all 80 characters of the screen text.