Loading...
Select Version
&pagelevel(3)&pagelevel
Domain: Variable access (variable name)
The LAYOUT-SCOPE( ) function applies only to structure layouts and supplies their scope. The scope of a structure layout is defined in the declaration of structure elements in the BEGIN-STRUCTURE command.
Format
LAYOUT-SCOPE( ) |
LAYOUT-NAME = string_expression |
Result type
STRING
Input parameters
LAYOUT-NAME = string_expression
Designates a structure layout.
Result
*TASK
The layout is declared with the scope TASK.
*PROCEDURE
The layout is declared with the scope PROCEDURE.
*INCLUDE
The layout is declared with the scope INCLUDE.
Error messages
SDP0442 LAYOUT DOES NOT EXIST SDP1101 SYNTAX ERROR IN VARIABLE NAME
Example
/BEGIN-STRUCTURE LAY1 / DECLARE-ELEMENT ELEM1 / DECLARE-ELEMENT ELEM2 / DECLARE-ELEMENT ELEM3 /END-STRUCTURE /A = LAYOUT-SCOPE(LAYOUT-NAME='LAY1') /SHOW-VARIABLE A A = *PROCEDURE
The structure layout LAY1 is declared in the structure declaration block between BEGIN-STRUCTURE and END-STRUCTURE. The scope PROCEDURE is the default assignment for the structure layout.