x"AF" Function 56 - Specify Panel for ACCEPT/DISPLAY

Specifies the panel to which you direct all subsequent ACCEPT and DISPLAY statements in your program. All ACCEPT and DISPLAY statements are directed to this specified panel until you make another call to this function.

Syntax:

call x"AF" using   specify-panel-fn
                   work-panel-ID 

Parameters:

specify-panel-fn pic x comp-x value 56.
work-panel-ID A PIC XX COMP-X field containing the identifying handle of the panel to be used for the ACCEPT and DISPLAY statements. If you use the panel created by Adis as a result of a call to x"AF" function 49, the panel identifier is 0.

Comments:

Your program must create a panel before you can execute this call, unless you want to work with the default panel created by Adis.

If the specified panel does not exist, the value 255 is returned in specify-panel-function, and the previously specified panel is used for the ACCEPT and DISPLAY statements.

If you direct an ACCEPT statement to a panel, the panel is enabled automatically so that the visible portion is not obscured by another panel. If the panels window is smaller than the panel, and the cursor position resulting from the ACCEPT is not currently visible, Adis positions the window so that the text at the cursor becomes visible. A DISPLAY statement directed to a panel is the same as the PF-Write-Panel when you update both text and attributes.

Example:

 01 specify-panel-fn    pic x comp-x value 56. 
 01 work-panel-id       pic xx comp-x.
            ...
*   (Code to create panel and move its identifier into
*      work-panel-id)   
            ...
     call x"af" using specify-panel-fn
                      work-panel-id.