|
Handy Oddballs Inside VESOFT covers
tips and techniques you can use with VESOFTs products,
especially MPEX. As always, I am totally open to getting input from
you users of MPEX, Security/3000 or VEAudit/3000 it helps me
learn, too. Send me your tricks, and well get a 3000 for
2000 cap out to you as our thanks. First lets talk about ALIAS, and its companion command UNALIAS. I remember this came about while I was working at VESOFT. We had just gotten a Unix machine in, and we found this and thought it was pretty useful, so we came up with a kludge to implement it. Eventually it got cleaned up and made part of MPEX. Essentially an ALIAS is a quick way to do something like a UDC or a command file. They have the advantage that they can apply only to you, they can be turned on and off at will, and can also be added to your MPEXMGR file. They can take a parameter after a fashion, essentially you can pass the right part of the command as a parameter, it just appends it to the ALIAS. An ALIAS can only be one line, and you cant put logic in it (well you can sort of do it, but its convoluted). Its probably good to show some examples. Here is a simple example
that is usually a UDC: %ALIAS SS SHOWJOB JOB=@S A better example of the ad-hoc nature of an ALIAS would be when you are testing a program and have some long run command to issue. You can just make an ALIAS of it and save yourself some typing, for example: %ALIAS TESTIT RUN MYPROG;INFO=TESTDATA1 TESTDATA2 Now you would just type
TESTIT whenever you wanted to execute the above command. %WHEREIS EDITOR ----- EDITOR MPE command EDITOR Program file in PUB.SYS%WHEREIS MPEX@ ---- MPEX System-level UDC in MPEXUDC.PUB.VESOFT MPEX Program file in PUB.VESOFT ----- MPEXHELP MPEX command ----- MPEXLDIR Command file in PUB.SYS ----- MPEXMGR Command file in WORK.VESOFT MPEXMGR Command file in PUB.VESOFT ----- MPEXSTOR MPEX command This command takes the name of a command as its parameter and displays how MPEX would interpret the name if it were issued as a command. WHEREIS uses the same rules that MPEX uses at execution time to determine how a command is executed. The command identifies all instances of the command that exist, the first one shown is the one that would actually be executed. The command parameter accepts wildcards, as shown in the second example. The command is useful if MPEX appears to execute a different command from the one you intended. It shows you when you have conflicts between the names of your UDCs and command files, and also if your HPPATH gives you access to the commands that you expect it to. MPEX uses the following
precedence when determining which command to execute: If the command parameter includes wildcard characters, all matching commands will be displayed. However, MPE commands are not shown when wildcard characters are used. As you can see, an MPEX
ALIAS will take precedence over any other command, which is why I
covered it first. This also means that you can easily, and quickly,
override an existing command by making an alias out of it. Shawn Gordon, whose
S.M. Gordon & Associates firm supplies HP 3000 utilities, has
worked with 3000s since 1983.
|