Hides specified variables or arrays that were defined in a calling program from the current program.
Syntax
PRIVATE VarList
-or-
PRIVATE ALL
[LIKE Skeleton | EXCEPT Skeleton]
Arguments
VarList
Specifies the variables or arrays to be declared private.
ALL LIKE Skeleton
Causes PRIVATE to hide all variables and arrays whose names match Skeleton, which can contain the question mark (?) and asterisk (*) wildcards.
ALL EXCEPT Skeleton
Causes PRIVATE to hide all variables or arrays unless their names match Skeleton, which can contain the question mark (?) and asterisk (*) wildcards.
Remarks
The hiding of variables created in higher-level programs enables variables of the same name as the private variables to be manipulated in the current program without affecting the values of the hidden variables. Once the program containing PRIVATE has completed execution, all variables and arrays that were declared private are again available.
PRIVATE doesn't create variables; it simply hides variables declared in higher-level programs from the current program.