| Front Page | News Headlines | Technical Headlines | Planning Features | Advanced Search |

     

Light of the Silvery SPOON

By Steve Hammond

Inside VESOFT covers tips and techniques you can use with VESOFT’s products, especially MPEX.

In our household, we split up the chores. My wife does the vacuuming and dusting and I handle the yard work. (You can always find our house — it’s the one with the foot-high grass and the weed-infested flower beds.) My wife does the laundry and I do the grocery shopping.

I try to pick my times at the local supermarket so that I avoid the “incorrigible child” hours. You know them, I’m sure; those times when the parents of the most ill-behaved children in the community do their grocery shopping simultaneously. Last Sunday was especially bothersome. I think there must have been convention of those parents in the area, because they were out in droves.

But before I beat a hasty retreat, I noticed one mother who was smart. As her little one started to get fussy, she would give him an animal cracker from her purse and he seemed content. She was all but spoon-feeding him. Pretty clever.

And our friends at Vesoft are pretty clever, too. They have their own SPOONFEED command that will make running other programs or utilities easier. And it even has some already built in!

You can actually execute QUERY and SPOOK5 commands within MPEX just by preceding a command with a “‘” (single quote) or “>”, respectively. For example:

%’base=PROD

>PASSWORD = >>
%
MODE = >>
%’5
>
%’find ssn=999999999
SSN IS A MEMBER OF THESE SETS:
SSN-KEY, APPLICANT, SCHOOL-DATA
WHICH SET DO YOU WISH TO USE?
>>
%’applicant
1 ENTRIES QUALIFIED
>
%’rep all

SSN =999999999
PREV-SSN =0
MOTIND =P
STATUS-DATE =20000612
COMPNAME =SMITH, REBECCA LYNN
SOIN =A
APP-YEAR =2001

While in MPEX, I told it to run QUERY against the PROD database. QUERY then prompts me for the password and mode (note that I have to put the single quote before my response - it does not appear before the password because echo has been turned off). After successfully getting access to the database, I ask for a specific SSN (‘find ssn=999999999) and I am asked which dataset I want - all standard QUERY functions. I get the one record available and report it. I could then do any number of MPEX functions and PROD will still be open in QUERY. Only when you exit MPEX, specifically exit QUERY (‘exit) or kill the process, does QUERY close that database. Therefore I could work in MPEX for an hour, then issue the command - ‘find ssn=234567890 — and QUERY would know I still wanted the dataset APPLICANT and it would search for that new record.

You can do the same with SPOOK5; that is, if you have SPOOK5 on your system (10 points for anyone still using SPOOK5, and extra credit for anyone who can tell me what SPOOK originally stood for). Just preface your SPOOK5 command with “>”.

Remember these processes are child processes and stay active while you are running MPEX, unless you specifically EXIT them or kill them. For example:

:mpex

%showtree
150 CI.PUB.SYS
156 MAIN.PUB.VESOFT (active) [you are here]

%’base=PROD
...

%showtree
150 CI.PUB.SYS
156 MAIN.PUB.VESOFT (active) [you are here]
136 QUERY.PUB.VESOFT
%kill 136
%showtree
150 CI.PUB.SYS
156 MAIN.PUB.VESOFT (active) [you are here]
%

In the example I started MPEX, then did a showtree to see what was running — in this case just the CI and MPEX (a.k.a. MAIN.PUB.VESOFT). I did the same sequence as above, starting QUERY, then did another SHOWTREE. Here you can see that QUERY is running as a child under MPEX. I then kill the QUERY process - number 136, and do another SHOWTREE, to show that QUERY is now gone. You can also do that by issuing the exit command for QUERY. Keep in mind that child processes could be running, affecting other processes you might be doing.

How does MPEX know which program to run when you type the single quote or the “>”? Simple, it goes back to our old friend MPEXMGR.PUB.VESOFT. One of the initialization commands is:

:SETVAR MPEXPREFIXDEF39 “SPOONFEED QUERY”
or
:SETVAR MPEXPREFIXDEF62 “SPOONFEED SPOOK5”

This is telling MPEX that when it sees the ASCII code 39 (the single quote) or the ASCII code 62 (“>”) to run either QUERY or SPOOK5. (Note: you must have HOOKed a program to be able to ‘spoonfeed’ it.) You can use any special character you want to denote the spoonfeed function, except for the MPEX reserved special characters of “%”, “!”, “?”, “$” and the comma.

How do you find the ASCII code for these special characters? My favorite place is still Section XI of the MPE IV pocket guide — a little brown spiral notebook that was the HP 3000 bible for many of us in the 1980s. But it’s also found in a section of Orbit Software’s much more recent Pocket Guides. [Ed. Note: You can get a Pocket Guide from Orbit’s Web site, $9.95 or free to all Orbit customers, at orbitsw.com/us/store.html. ] If you are still unsuccessful, find an old-timer who can do octal to hexadecimal conversions in his head. He’ll know the proper values.

So if I wanted to run my program ONLINE.OBJECT.PROD using the “^” special character, I would type %HOOK ONLINE.OBJECT.PROD and add :SETVAR MPEXPREFIXDEF94 “SPOONFEED ONLINE” to MPEXMGR.

If you need to run your program with some runtime parameters, then you need to know about another command, SPOONINIT. I almost always run ADAGER with a runtime of PARM=1, the “expert” mode, meaning ‘less chat and more action.’ If I want to run that from MPEX, I can do %SPOONINIT ADAGER;PARM=1.

This is handy for the programs that need a DL or an INFO string or a MAXDATA. Be careful though, because there are several parms you can’t use, including DEBUG, INMSG, INPUT, NOPRIV and NOACTIVATE.

So SPOONFEED to your heart’s content within MPEX. If you’re lucky, the spoon might even be silver!

Steve Hammond, who works for a professional association in Washington, DC, was born with a silver foot in his mouth.


Copyright The 3000 NewsWire. All rights reserved.