HPlogo Accessing Files Programmer's Guide: HP 3000 MPE/iX Computer Systems > Chapter 3 Specifying a File Designation

Using Command Interpreter Variables and Expressions Within File Designators

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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 (32650-90011).

Feedback to webmaster