« Noteworthy dates drive views of the future | Main | Middleware rescues a Quiz captive, again »

November 18, 2016

Friday Fine-Tune: Tricks with command files

I'm working on a command file on my HP 3000. Is there any way to have it copy part of itself into a separate (temporary) file?

Jeff Vance replies:

MPE does not support the Unix concept of ‘here’ files, where input data for the command can reside in the same file as the command, except in the case of jobs. But even in a job, you may not include inline data for a script or UDC invoked by that job.

The SPOOKHELP script may be of some use. This single script contains the help text for all of the SPOOK commands plus the code to search for and display that text once HELP xyzzy is entered.

How can we execute a command after a user enters the :bye command in MPE?

Olav Kappert replies:

It is possible to execute many commands after the bye has been entered.  Simply create a UDC (maybe a cmd file) called bye.

The contents of the UDC for the command bye is up to you.  This would be useful if you want to do statistics before the session terminates.

John Pittman adds:

Don’t let them do a bye. We don’t allow any users access to OP system prompt at all. They get a logon no break UDC that runs a menu, and when they end the menu, they get logged off.

Inside that UDC at exit time, we build a string giving user, connection point (LDEV or IP of their PC) connect time, CPU date etc and append it to a log file. Then we know when anybody last used the system, how many users are using different connections, or when different user names are using the same connection point.

11:10 PM in Hidden Value, Homesteading | Permalink

Bookmark and Share

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



The comments to this entry are closed.