| Front Page | News Headlines | Technical Headlines | Planning Features | Advanced Search |
Pivital Solutions Sponsor Message

     
November 2003

Hooking Up With Programs

By Steve Hammond

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

I was lucky enough to attend HP World in Atlanta this year and I had the great time I expected to have. There were the usual drunken bashes with strippers that lasted past dawn until we all took over a local pancake house, commandeered the waffle iron and made waffles shaped like...oops, sorry, I’m confusing HP World with my local Oprah’s Book Club. Sorry.

It was a chance to renew old friendships, catch up on new products and try to figure out what this industry is going to do next. Most of my time was spent working for the NewsWire checking out what was happening in the world of COBOL. I attended the SIG-COBOL meeting which seemed to convene in South Carolina (any of you who attended that meeting and made that walk know what I mean!) and met with several vendors to discuss COBOL issues.

After missing a year, it reminded me how much I enjoyed the opportunity to hook up with old friends, and if you are clever enough, you can let MPEX hook up with a multitude of programs on your e3000.

HOOK or MPEXHOOK makes using MPEX even simpler. When you ‘hook’ a program, it allows you to execute MPEX commands from inside the program that you hook — Editor, Query or any other program you choose.

I once heard Eugene Volokh describe how a customer said he didn’t use MPEX — because to do anything, he had to save his file, exit his editor, open MPEX and do whatever he had to do, then exit MPEX, reopen his editor and subsequently text in his file. (This was in the dark ages, before we could open multiple windows and multi-task to our hearts’ content.) That inspired Eugene to create the hook functionality, so that now you can execute MPEX commands from within a hooked program by merely typing “%” followed by the proper MPEX command.

Well, that was long ago, but the functionality is still there and still makes life easier for us all. When you install MPEX, two programs are automatically hooked — EDITOR and QUERY. To run the ‘hooked’ version of either of those programs, you need to run the version in PUB.VESOFT with the lib=P option, :RUN EDITOR.PUB.VESOFT;LIB=P

Figure 1 below shows an example. Doesn’t it look easy?

:run editor.pub.vesoft;lib=p

/%listf stev@,3
MPEX/3000  31N20512  (c) VESOFT Inc, 1980  6.0  03:06915  For help type 'HELP'
                        MPEX %LISTF stev@   PAGE 1
           STEVE,MANAGER.SYS,PUB   TUE, XXX XX, 2003, 11:01 AM
ACCOUNT=  SYS         GROUP=  PUB
FILENAME CODE  CREATOR  CRE-DATE  MOD-DATE  MOD-TIME  ACC-DATE  RST-DATE
STEVE1         MANAGER  19 APR 01 19 APR 01 09:51 AM 27 JUN 03 05 MAY 03
STEVE2         MANAGER  19 APR 01 19 APR 01 09:48 AM 27 JUN 03 05 MAY 03
STEVEHDR       MANAGER  30 DEC 99 30 DEC 99 10:00 AM 27 MAR 01 05 MAY 03
STEVEIND       MANAGER  25 APR 98 25 APR 98 10:50 PM 01 SEP 99 05 MAY 03
STEVEJOB       MANAGER  08 AUG 02 08 AUG 02 02:56 PM 08 AUG 02 05 MAY 03
STEVELB2 OUTSP MANAGER  08 MAR 00 08 MAR 00 09:24 AM 09 MAR 00 05 MAY 03
STEVELBL OUTSP MANAGER  08 MAR 00 08 MAR 00 09:22 AM 08 MAR 00 05 MAY 03
STEVEXX        MANAGER  19 MAR 02 19 MAR 02 08:46 AM 08 AUG 02 05 MAY 03
STEVEXXX       MANAGER  03 APR 02 03 APR 02 03:33 PM 10 APR 02 05 MAY 03
STEVSTOR       MANAGER  03 APR 02 03 APR 02 03:37 PM 10 APR 02 05 MAY 03
GROUP     TOTAL:    10 FILES        4 MEGABYTES          16960 SECTORS

/

It works for QUERY and any other program you HOOK, using the command: %HOOK program.group.account, and you can add “;MPEXPREFIX=symbol” to the end of the command to change the command prompt for the ‘inside’ version of MPEX to something other than “%”. For example, using “MPEXPREFIX=#” will change the MPEX command from “%” to “#”. This comes in handy when you run into a program that uses “%” as a prompt.

You need to ‘re-hook’ your programs when you install a new version of MPEX. I always hook SUPRTOOL, QEDIT and TDP (anyone out there still using TDP?); the latter two are used in MPEX commands.

There are a couple of fringe benefits when you hook a program. It adds a REDO function to the program if there is not one there. I can remember cursing the lack of a REDO in DBUTIL and SPOOK, so this in itself makes MPE life much easier. To activate this function, you must type :REDO, :LISTREDO and :DO — note you have to preface the command with “:”. You can use the abbreviations (comma for REDO, two commas for LISTREDO and a period plus a comma for DO) without the leading “:” and in some cases where typing “:” terminates the program (like SPOOK5), you MUST use the abbreviations.

Secondly, and maybe more importantly, if you have SM capability, you can save files across account boundaries from a hooked editor. Often, in my old system manager days, I used my hooked version of QEDIT to save files to any number of different accounts, or even better, with MPEX running a QEDIT command on an indirect file listing of files in 30 or more different accounts.

So with the trusty HOOK command, you can use MPEX to be even more productive — in programs that aren’t from our friends at Vesoft!

Steve Hammond, who works for a professional association in Washington, DC, wonders who out there remembers the original name of TDP and the name of his friend who wrote it.


Copyright The 3000 NewsWire. All rights reserved.