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

     

Mailbag rescues desperate writers

By Steve Hammond

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

The deadline is looming — I’m stuck for a topic for this column. Desperate times call for desperate measures (except for Sundays at 9/8 Central, which calls for Desperate Housewives). It’s time for the fake mailbag column.

Dear MPEX Answerman,

Last week, management fired this jerk programmer. He always arrived late, took long lunches and left early. He smoked like a chimney, and I think those long lunches included beverages that made Milwaukee famous. Unfortunately, they told him he was out the door about a hour before they told the rest of us, and in those 60 minutes, he put lockwords on random crucial files. We’ve found about five and corrected them with the help of MPEX, but we have no idea how many others are out there. We’re concerned there may be a lockword on a file that will shut down production. Can you help?
— Signed, Desperate in Durango

Dear Desperado,

First of all, let me say the jerk was not me! I know he sounds like me, but I’ve never been in Durango! That aside, come in off the ledge because I can help. Just log on as system manager, run MPEX and:
%LISTF @.@.@(LOCKWORD<>“”),2

Lo and behold, every file on the system with a lockword magically appears on your screen. Or if you put your output into my favorite option - an indirect file - and then alter the files with
%ALTFILE ^indfilename;LOCKWORD=“”

And next time, when they fire a jerk, ask management for a heads up so you can lock up his logon before they lower the boom.

Dear MPEX Answerman,

In our production environment, we “close out the books” on a monthly basis. My job includes most of the duties involving closing the old month and opening the new. I have a list of about 25 steps I have to perform and one of them involves clearing out the existing files for the new month. There are a bunch of them and they are different formats, record lengths, blocking factors, etc. I usually text them into and editor and delete all the records or I purge and rebuild the file. But I almost always screw up one of them. This means nasty phone calls from the production floor, or worse, we don’t notice it until later and have to rebuild the data midway through the cycle. Can you help?
— Signed, Desperate in Duluth

Dear Destitute,

There’s a man out there to help you and it is me. First of all, you need to write a script to do all that work for you. When we were doing Y2K testing, I had a couple 1000-plus line scripts to test values and examine dates, then reset all the data and files for the next date to test. But that aside, you can do everything you want to do with one simple MPEX command: %ERASE fileset

Viola! The data is cleared out, but the file structure remains. Even the EOF, which if I know from experience may be critical to your operation, is preserved. And you can include all sorts of MPEX commands in those scripts you should start writing - tomorrow.

Dear MPEX Answerman,

There are times when I need to run an MPEX process in job mode rather than session mode. I hate to try to build a job stream because I always do something wrong and it takes about five or six tries before I get it right. Any advice.
— Signed, Desperate in Encino.

Dear Destined for Failure,
Do you ever watch Norm the Carpenter on those do-it-yourself shows? When he’s doing a repetitive task, he creates a template. (Let’s ignore the fact that he’s building a 37-piece dining room set in 22 minutes and creating the template would be a four-day project for you or me.) MPEX has a two ‘templates’ to help you do this without even firing up your text editor of choice. The first is so simple, you’ll kick yourself — precede your command with ‘$’. That tells MPEX to execute the command in batch (aka job) mode. The other choice, very helpful if the job parameters differ from those of your current logon, is to use the %SUBMIT command. Simply put:

%SUBMIT “MANAGER.SYS;OUTCLASS=LP,1,1” PURGE LOG####.PUB.SYS

This tells MPEX that you want to submit a job with the user MANAGER.SYS, with the output going to the line printer with one copy and the output priority of 1. That job will purge all the log files in PUB.SYS. as MANAGER.SYS. If your current logon does not have SM capabilities, then MPEX will prompt you for the appropriate passwords before it streams the job. Remember that the %SCHEDULE command also does something along these same lines.

Correction from December column: It was brought to my attention by VESoft President and Chief Proofreader Vladimir Volokh that I had what could be a confusing typo in the December column. When discussing use of the %PRINT...command; I said:

%PRINT filename; FORMAT=...

“The trick is that the FORMAT option does not output the exact record, but instead outputs some function of the record. FORMAT=R[0:15] — not the square brackets — will only print the first 15 characters of any given line.”

The “not” should have been “note” — “note the square brackets.” Mea Culpa. I apologize for any confusion, job failures or early morning phone calls.

Steve Hammond, who works for a professional association in Washington, DC, bets that wasn’t the first mistake he made in his columns.


Copyright The 3000 NewsWire. All rights reserved.