« TE turnoff date for 3000s could be 2021 | Main | Essential services: 3000-MPE/iX computing »

March 31, 2020

MPE file equations and Unix equivalents

Blackboard equation
HP 3000s, as well as MPE, employ a unique tool to define the attributes of a file. That tool is file equations, a 3000 speciality. Robelle calls these "commands that redefine the attributes of a file, including perhaps the actual filename."

In any migration away from HP 3000s (an ill-advised move at the moment, considering the COVID-19 Crisis) managers must ensure they don't lose functionality. Unix doesn't have file equations. Customers need to learn how to make Unix's symbolic links report the information that 3000s deliver from a LISTEQ command.

3000 managers are used to checking file equations when something mysterious happens with an MPE file. Dave Oksner of 3000 application vendor Computer And Software Enterprises (CASE) offered the Unix find command as a substitute for file equations. You need to tell find to only process files of type "symbolic link."

Oksner's example of substituting find for LISTEQ:

find /tmp/ -type l -exec ls -l {} \;

which would start from the /tmp directory, look for symbolic links, and execute “ls -l” on the filenames it finds. You could, of course, eliminate the last part if you only wanted to know what the filenames were and get

find /tmp/ -type l

(I believe it’s the same as using ‘-print’ instead of ‘-exec [command]’)

Beware of output to stderr (if you don’t have permission to read a directory, you’ll get errors) getting interspersed.

Jeff Vance added that the command interpreter in MPE also can deliver file information through a listfile command:

Don't forget the CI where you can do:

:listfile @,2;seleq=[object=symlink]

:help listfile all shows other options.

Our former Inside COBOL columnist and product reviewer Shawn Gordon offers his own MPE vs. Unix paper, and Robelle's experts wrote a NewsWire column contrasting Unix shell scripts with MPE tools.

Image by Gerd Altmann from Pixabay

06:46 PM in Hidden Value, Homesteading, Migration | Permalink

Bookmark and Share

Use our search engine to find 20 years
of HP 3000 news and articles

Comments

Comments

The comments to this entry are closed.