ALWROL (Allow Roll) keyword for display files

This record-level keyword enables your program to page through data in a window on the display when the system is displaying the record format you are defining.

The window consists of display lines between and including a start line and end line defined in your program. The number of lines to be paged through and the direction in which to page through them are defined in your program.

This keyword has no parameters.

When your program sends an output operation to this record format, the IBM® i operating system pages through data already in the window up or down the display and then displays the record format. Data paged past the start line or end line is lost. After you page through, your program cannot send an input operation to record formats that were either partially or completely within the window before the page.

To use the ALWROL function in COBOL, use the WRITE ROLLING statement.

The ALWROL keyword does not allow the display station user to page through data; it only allows your program to page through data on the display. To allow paging of data by the display station user, specify the ROLLUP and ROLLDOWN keywords or specify a subfile with subfile page not equal to subfile size.

To prevent deleting paging records, specify the OVERLAY keyword or the CLRL (Clear Line) keyword with the ALWROL keyword.

Do not specify the PUTRETAIN keyword at the field level when you also specify the ALWROL keyword. If you do so, the IBM i operating system sends message CPF5014 when your program sends an output operation regardless of your selection of PUTRETAIN.

If you specify the ALWROL keyword with the following keywords, you must specify option indicators for them:

ERRMSG
ERRMSGID
PUTOVR
PUTRETAIN (at the record-level)

Your program cannot at the same time select one of these keywords and send an output operation that attempts to use the ALWROL function (the IBM i operating system sends CPF5014).

The ALWROL keyword cannot be specified with any of the following keywords:

ASSUME
KEEP
SFL
SFLCTL
USRDFN

A warning message appears at file creation time if the ALWROL keyword is specified on a record with the DSPMOD keyword. At run time, the ALWROL keyword is ignored when the display mode changes.

The ALWROL keyword cannot be specified for the record format specified by the PASSRCD keyword.

Option indicators are not valid for this keyword.

Example

The following example shows how to specify the ALWROL keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A    1  R RECORD1                   ALWROL OVERLAY  2
00020A            FLDA          79   I 23  2CHECK(LC)
00030A  44                           3  ERRMSG('Record not found' 44)
     A
1
The application program can send an output operation to RECORD1, displaying FLDA on line 23, position 2. In a subsequent output operation, the program can page through RECORD1 (in this case, FLDA) up or down the display or entirely off the display. A normal case is to page up one line. The originally typed data is then displayed on line 22, and a new input field is displayed on line 23. The display station user cannot type into the field on line 22, and the program cannot read this field. The field on line 22 can be pushed up the display by subsequent output operations in this way until it passes the start line of the window (as specified in the program) or line 1 of the display.
2
The OVERLAY keyword prevents paged records from being deleted.
3
The ERRMSG keyword is shown to illustrate how ERRMSG affects the ALWROL function. The program cannot at the same time set option indicator 44 on and send an output operation that requests the ALWROL function. If the program does so, the IBM i operating system sends a notify message CPF5014.