Accessing Files Programmer's Guide (32650-90885)

Chapter 3 83
Specifying a File Designation
Using Command Interpreter Variables and Expressions Within File Designators
Using Command Interpreter Variables and Expressions
Within File Designators
Your file reference may also contain command interpreter variables and expressions that
are evaluated before the file reference is parsed and validated. In the following file
equation, the exclamation point (!) instructs MPE/iX to substitute the variable name
MYFILE with the actual file designator assigned to that variable by the SETVAR command.
SETVAR MYFILE,'FILE2.MYGROUP.MYACCT'
FILE FILE1=!MYFILE
The HPFOPEN and FOPEN intrinsics also allow you to embed command interpreter
variables and expressions in the file reference. The following file references are valid when
passed as formal designators:
!MYFILE
!MYFILE.!HPGROUP.!HPACCT
!FILE1/![FINFO(-!FILE1",33)]
For more information about using command interpreter variables and expressions, refer to
the Command Interpreter Access and Variables Programmers' Guide.