[Robelle] [SmugBook] [Index] [Prev] [Next]

Command Files in MPE

On MPE, command files are a way for the user to create his or her own custom commands. A command file contains parameter definitions and MPE commands, including If and While to control the logic. The equivalent to a command file on UNIX is the shell script. Qedit command files are like MPE command files, but they can include Qedit commands preceded by a slash "/".

To learn more about command file programming, see Ken Robertson's paper "Programming the Command Interpreter" (Robelle, 1995).

FINFO for File Information

The FINFO function is used in MPE commands to test and save the attributes of a file.

:setvar myvar finfo('myfile','eof'){save record count}

:if finfo('myfile','eof') > 0 {test record count}

The first parameter to FINFO is the filename and the second is the attribute desired. FINFO now allows a string literal for the attribute, instead of the hard-to-remember numeric parameter that was originally supported. On MPE/iX you can get a list of supported FINFO attributes by doing :help finfo.

[Robelle] [SmugBook] [Index] [Mpetips] [Prev] [Next]