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

     

Full Sets and Inducing Sleep

By Steve Hammond

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

In one of his routines, Bill Cosby talked about how he loved to sleep. He said that when he slept, he smiled. Well, that’s me. Nothing worse than getting roused from a dream involving me and some stunning red-haired beauty.

So when I assumed responsibility for a system that did nightly processing and involved heavy updating of several databases, I had to figure out a way to avoid those pesky calls at hours that had single digits. This was in the Mesozoic Era when disc was still expensive, so we could not just set the capacities as high as we wanted and ignore it. We had to ‘manage’ it. I hate trying to remember to do something every day, so I needed to figure out something that would happen on its own and let me know if there’s a problem.

Enter MPEX and the DBSETFULLNESS file attribute. A regularly scheduled job with the command:

%LISTF @.GROUP.ACCOUNT(DBSETFULLNESS>.9)

This would find any datasets more than 90 percent full. Eventually when that thing called ‘e-mail’ came into common use, I added a nice step that would send an e-mail to tell me about any problems. I had an almost foolproof means of avoiding the “DATASET FULL phone call”. (Of course, nothing is foolproof, as I’ll explain in the next “Solving a mystery” section.)

There are several other MPEX attributes out there for datasets. Need to find all your automatic masters? Try %LISTF @.@.@(DBSETTYPE=“A”). (The other choices there are “D” and “M”.) You can search for datasets by name (DBSETNAME), number of entries (DBSETENTRIES), high-water mark (DBSETHIGHWATERMARK), blocking factor (DBSETBLOCKFACTOR), numbers of paths (DBSETNUMPATHS) and even wasted space in a block (DBSETBLOCKWASTAGE).

And those file attributes are not just for simple files and database-related files — you can use MPEX to select spool files by specific criteria too.

The attribute always begins with “SPOOL.” followed by the specific item to look for. SPOOL.ISACTIVE finds any active spool files (there’s our old friend ‘IS’). Other booleans to tag along with SPOOL. are ISREADY, ISOPENED, ISLOCKED, ISDEFERRED and ISSPSAVE.

You can also look for attributes like the JOBNUMBER, the USER, the ACCOUNT, the FILE (actual file name), the SPOOLFILENUM and the DEVICE. If there’s a forms message, then HASFORMSMSG is what you are looking for.

Now, you might ask why anyone would use this, but I have a real life example. Once a year, I had to convert about 300 reports from spool file to PDF. To do the conversion I used OpenSeas’ Fantasia (my favorite print formatter and an excellent product). Well, I didn’t want to do this manually 300 times, so I set up a REPEAT...FORFILES command file. I had all the reports spooled out with an output priority of 2 (a priority we generally never use). Then I would run the following MPEX command file:

repeat

run laser.laser.larc;parm=97; <other Fantasia parameters>

forfiles @.out.hpspool(spool.outpri=2)

The command file looks for every spool file with the priority of 2 — as represented with the @.out.hpspool(spool.outpri=2) — and it would run them through Fantasia. It worked like a charm, and yet again MPEX made my life much easier.

Solving a mystery

When I was playing with examples for this column, I created the job at right. It looked for any datasets fuller than 80 percent. (Figure 1 below shows the edited form, with its output edited for brevity).

Figure 1

JOB DBCHECK,MANAGER.XXXXXXX.
Priority = DS; Inpri = 8; Time = UNLIMITED seconds.
Job number = #j290.
THU, JAN  3, 2002, 11:50 AM.
HP3000  Release: C.60.00   User Version: C.60.00
MPE/iX  HP31900 C.16.01  Copyright Hewlett-Packard 1987.
All rights reserved.
STREAMED BY STEVE,MANAGER.XXXXXXX(#S192) ON LDEV# 266
    STREAM DATE:   THU, JAN  3, 2002, 11:50 AM
:comment ********
:comment * this job checks for datasets > 80% full
:comment * in the shared group
:comment ********
:run main.pub.vesoft;parm=1

MPEX/3000  29N00420  (c) VESOFT Inc, 1980  6.0  03:06927  For help type 'HELP'

%listf @.shared(DBSETFULLNESS>.8),DB
                 MPEX %LISTF @.shared(DBSETFULLNESS>.8)   PAGE 1
           DBCHECK,MANAGER.XXXXXXX,PUB   THU, JAN  3, 2002, 11:50 AM


ACCOUNT= XXXXXXX    GROUP=  SHARED

FILENAME        SET NAME         TYPE   LDEV            ENTRY
         CAPA-                  %FULL
                                                 COUNT        CITY
FWRTBL02    TAX-YEAR-MAST    M       35           2            2            100.0%
HISTDB06    HIST-BIO         D       31        548129        755157         72.6%
HISTDB07    HIST-MCAT77      D       32        640632        773000         82.9%
HISTDB08    HIST-MCAT91      D       45        124859        163728         76.3%
IRRGDB01    IRREG            M       44         3287           3500
93.9%
PULLDB02    APPLFILE         D       30         1815           2004
90.6%
REFRDB07    SCHOOL-KEY       A       45          209            250
83.6%


%exit

Here’s the mystery. Correct me if I am wrong, but when I learned percentages in fourth grade, 72.6 percent was less than 80 percent. Then why would MPEX tell me that two datasets that are about 75 percent full are greater than 80 percent full?

Now, my dear Watson, I can certify that the people at Vesoft are smart people, so this is not a stupid error. There must be something we’re not seeing.

In fact, the command is correct, and Holmes is also correct. We’re just not seeing all the numbers. The key is that both those datasets use DDX (dynamic dataset expansion).

In the first case, the entry count is correct, but the MAXIMUM capacity is shown, not the current capacity, which is 127656. Divide the values and we get 97.8 percent! Now that’s more than 80 percent. The second item is the same with a fullness of 91.3 percent. So we see that the DBSETFULLNESS value is determined by dividing the entry count by the current capacity, but the LISTF,DB displays the max capacity and computes the %FULL using the max and the entry count.

Mystery solved!

Steve Hammond, who can be regularly seen with his deerstalker cap and Meerschaum pipe, works for a trade association in Washington, DC.


Copyright The 3000 NewsWire. All rights reserved.