HP3000-L Archives

January 2001, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Fri, 12 Jan 2001 11:03:32 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (60 lines)
Sigh...I'll try again.  The first one seemed to get randomly formatted.

Re:
Glenn writes:
> Ron Horner writes:
> > Wouldn't it be easier to write a program that uses HPVOLINFO???
> That depends on your definition of "easier."
> It has been shown that productivity is improved when writing
> in a scripting language.  Chances are, given the choice between
> writing a short CI script vs. a short compiled program, even
> today you choose the CI script.

Although you can probably get an apparently working  result quicker via
scripting (and I did), you'll get a  better, more reliable, more efficient
program if you write  one using HPVOLINFO.  What people forget about scripting
solutions is that they're generally not good at handling problems.
The script:

> #!/bin/sh
> callci "DSTAT ALL" |
>    awk '$2 ~ /MASTER/ {x = $NF;
>      sub("^\(?","/SYS/PUB/VOLUTIL \"showset ",x);
>      sub("-[0-9]+\)?$"," classes\"",x);
>      print x; }' >/tmp/vcl.$$
> . /tmp/vcl.$$
> rm /tmp/vcl.$$

relies on DSTAT ALL output, plus VOLUTIL output, plus the ability  to create
files in /tmp ... all of which could change and/or have  problems.

Heck, simply running VOLUTIL from the shell is fraught with problems...  I
tried it, and ran into show stopping bugs.

Here's one example...in the following, note that the attempt  to run VOLUTIL
and get the output into a file failed utterly, with  no warning (on our 6.0
system):
    /SIELER/HFS: /SYS/PUB/VOLUTIL "showset users;info=classes"
    Mirvutil  A.01.00, (C) Hewlett-Packard Co., 1991. All Rights Reserved.
    volutil: showset users;info=classes
    Volume-class name:                       Index:
    -----------------                        -----
    DISC                                      1

    /SIELER/HFS: /SYS/PUB/VOLUTIL "showset users;info=classes" > foo
    /SIELER/HFS: cat foo
    /SIELER/HFS: ll foo
    -rw-rw----   1 STAN.SIELER       SIELER         0 Jan 12 10:39 foo

Also, in some cases (which I saw when developing my first script, but  I can't
reproduce now), VOLUTIL seems to get confused by the input  parameter (INFO
gets corrupted?).  In other cases, the shell reports  a problem with "waitany"
(?).
In short, think of scripting like a 4GL ... yes, you can usually  get an answer
faster ... but it isn't as robust or efficient as using  a 3GL.

Stan Sieler                                           [log in to unmask]
www.allegro.com/sieler/wanted/index.html          www.allegro.com/sieler
Stan Sieler                                           [log in to unmask]
www.allegro.com/sieler/wanted/index.html          www.allegro.com/sieler

ATOM RSS1 RSS2