To repeat a line or block of lines, use any of the following forms of the repeat (R) line command:
|
Use: |
To: |
|---|---|
|
%R(space) |
Repeats the indicated line one time. |
|
%Rn(space) |
Repeat the indicated line n times. For example, %R2 repeats the line two times. |
|
%RBn(space) . . . %RE(space) |
Repeat a block of lines n times. %RBn defines the beginning of the block and the number of times the block is to be repeated. %RE defines the end of the block. Note: The %R line command is not subject to the same repetition limit as the top-line command REPEAT. For example, %R100 is a valid command, REPEAT 100 is not. |
Scenario—Repeating Lines
The following sample screens illustrate the process of repeating lines. The following screen shows the original work file:
IDD nn.n ONLINE PAGE 1 LINE 1 1/3 02 WK-GROUP USAGE IS DISPLAY OCCURS 5 TIMES. 05 WK-VARIABLE-A USAGE IS DISPLAY PIC X(2). 05 WK-BIT-1 USAGE IS BIT PIC X(3).
To repeat a line, enter %r2 on the line you want to repeat.
IDD nn.n ONLINE PAGE 1 LINE 1 1/3 02 WK-GROUP USAGE IS DISPLAY OCCURS 5 TIMES. 05 WK-VARIABLE-A USAGE IS DISPLAY PIC X(2). %r2 5 WK-BIT-1 USAGE IS BIT PIC X(3).
After entering the repeat command, the repeated lines appear so that you can modify them in the work file.
IDD nn.n ONLINE PAGE 1 LINE 1 1/5 02 WK-GROUP USAGE IS DISPLAY OCCURS 5 TIMES. 05 WK-VARIABLE-A USAGE IS DISPLAY PIC X(2). 05 WK-BIT-1 USAGE IS BIT PIC X(3). 05 WK-BIT-1 USAGE IS BIT PIC X(3). 05 WK-BIT-1 USAGE IS BIT PIC X(3).
|
Copyright © 2014 CA.
All rights reserved.
|
|