Re: despair



On Sep 15, 10:47 pm, "David P. Murphy" <dpm_goo...@xxxxxxxxx> wrote:
On Sep 15, 10:39 am, AEF <spamsink2...@xxxxxxxxx> wrote:

Please tell me what error from the ALLOCATE command would screw things
up and how.

True, attempting to allocate an already-owned device results in a
warning. Clearly, instead of
$ ON ERROR THEN CONTINUE
the handler should state
$ ON WARNING THEN GOTO ABORT_THIS_JOB

So why don't you ask why the ALLOCATE command only gives a W when it
fails?

What error from INIT would screw things up? My experience is that when
INIT fails, it's an F error.

Obviously, the message is
%SYSTEM-F-DEVMOUNT, device is already mounted
and, has been pointed out to you already, a severe error (-F-) will be
trapped by an ON ERROR handler.

Obviously you've never worked with 4mm DAT drives! I've seen more
interesting fatal errors, like "fatal controller error", e.g., due to
the drive having gone bad.

ON ERROR THEN CONTINUE is a rather odd command.

Yes, I realized the code was bad. I even said so. But I could envision
circumstances in which it would not cause a problem. If only the
system manager loaded tapes, there'd be no problem. Yes, if I were to
come across code like this I'd fix it if I had the time. But keep in
mind that many IT shops are undermanned and many admins have to work
with multiple OSes and are probably reasonably competent in only one
or two of them.

I was trying to come up with reasons for what looks to me like a quick
and dirty fix. Maybe the person didn't have more time to spend on the
code. Maybe this _was_ the best he could do. Maybe not. I just don't
like it when people like you are so quick to blame someone without
knowing all the facts.

Maybe the author was a VMS novice. You can't expect someone to be an
expert from day 1.

Relax, dude! The world is not going to end because of this command
procedure.

I never said that. It's wrong, and your slacker attitude is exactly
why it's wrong. Who are you to _not_ do your best work?

Hey, *I* didn't write that code snippet. I also clearly stated in my
previous posts in this thread that I didn't recommend that style of
code-writing. I just didn't see it as worth getting so upset over.

I do not have a slacker attitude. Stop accusing me of things I am not
guilty of.

And how do you know it wasn't that person's best work? Maybe he was a
VMS novice. Maybe he was a Unix admin who knew very little VMS. You're
very quick to make assumptions. And you know the old joke about
ASSUME, right?

Are you really surprised that some people do shoddy work? There are
people who commit crimes! Murder even!!! And you're surprised by an ON
ERROR THEN CONTINUE in such a screwy way? :-) Is this the first time
in your life that you've come across shoddy workmanship?

Millions of people of suffered horribly and/or have been murdered
because of evil people and this continues to this day. And to you this
is apparently not a problem. But someone writes some crappy code that
possibly overwrites a tape and/or fails to make a backup of stuff that
may be of little importance and suddenly you lose faith in humanity!
Please, have some perspective.

You clearly
have a decent grasp on this subject, yet you're trying to argue that
it makes a difference whether the tapes get changed daily. WHAT THE
HELL DOES THAT MATTER?

I already answered this in a previous post. The difference is n-1
tapes, some of which may be offsite. I'd say that's a considerably
better situation than if the same tape were in the drive all the time.
Also, if the same tape were in the drive all the time, the problem you
found in the log file wouldn't have happened!!! :-)

No, it doesn't make the code any better, but I was curious, so I
asked. Is that so terrible?

It's a command procedure and should be written
as best you can, in anticipation of things going wrong, because things
*will* go wrong. I'm not talking about wild, extremely unlikely acts.

Lots of things "should be". Is this the first time you've come across
something that wasn't as it "should be"? Have you never worked on a
computer running Windows?

You do what's appropriate for the job at hand. You don't spend
millions of dollars to prevent problems that will cost only thousands.
Everything we do is an economic decision. Is it worth an hour's sleep
to run out to the store at bedtime and get eggs for breakfast? Is it
worth taking the car to go only n blocks? Is it worth it to buy an
extended warranty on this product I just bought (usually not!). Is it
worth doing more on this code? At some point it won't be, but that
depends what the purposes of the system, apps, etc., are. You don't
build a nuclear containment dome for your washing machine.

I'm talking about "someone left the wrong tape in" or "someone else is
using the drive and in fact allocated it" or "someone else is the
operator now and is using the tape drive in a different manner than
when this command procedure was coded". I'm upset that someone could
have written this correctly but didn't, because there's no excuse.

How do you know the person could have written it correctly?

Using the tape drive in what different manner? You have a daily job
and you change the tapes once a day. If the job is not unloading the
tape at exit, that's a problem in and of itself.

I'm not going to relax. I'm going to educate, if the culprit is
willing to learn, or rant, if he is not. I've seen too much sloth
and ignorance over the years to be complacent about it.

I didn't say be complacent. I said not to overreact.

Maybe it was written by a BOFH!
Nah, the *** always knows exactly what he's doing.
Sorry, I disagree or missed your point (about BOFH).

Then you aren't very familiar with him. His competence is very high.

Hmmmm. Two jobs ago I worked with an operator and he once screwed
things up through incompetence and disobedience. His intent was noble:
He thought that if he just did all the steps quickly enough the job we
told him not to run that evening would finish by morning before the
users needed the system. Of course the job ran a few hours over the
following day's start time, and we just had to wait for it to complete
before opening the system to the end users (who used the system to
take orders for products over the phone). I guess that's not a BOFH,
but that's what I was thinking of. (Normally this job would finish on
time, but the DBA and I knew that this particular day -- for some
reason I don't remember -- would without any doubt not finish anywhere
near on time. We explained this to the evening operator that but he
didn't listen.)

I find it interesting that you get all upset over this code snippet
yet you can't even tell me if the tape is changed daily! You appear to
know nothing at all about this environment except this code snippet.

I fail to see how that matters in regard to the quality of this code.
Nothing you can learn about the environment can justify that mistake.

Because (in addition to what I've already said) *IN GENERAL* it makes
sense not to greatly exceed the effort really needed for the job.
Apparently you feel that this code is a catastrophe even if unused.
OK. I'll accept that.

Example: You don't use an egg carton to ship 12 screws. You don't put
a bank-safe-quality combination lock and door on your bathroom -- a
simple cheap doorknob lock and plain wooden door will suffice.

My point was that you do what's appropriate for the situation. Are you
playing stupid video games or running a nuclear power plant? I say
that makes a difference.

How did you come across this code in the first place? What is your
role at this place that you have access to this code but still don't
know if the tape is ever changed?

Because I saw this in the logfile:

%SYSTEM-W-DEVALLOC, device already allocated to another user

Hmmm. Why does this only get a warning? Shouldn't it be fatal, or at
least a regular error? Where's your outrage over this?!

followed by the inevitable

%SYSTEM-F-DEVMOUNT, device is already mounted

and immediately thereafter

%BACKUP-F-POSITERR, error positioning $1$MUA400:[000000]DAILY.BCK;
-SYSTEM-F-SERIOUSEXCP, serious exception detected by TMSCP
controller


AHA!!!!! Withholding evidence!!! Sloppy, sloppy, sloppy! And you
complain about the code author!!! ... HAH!

This is like when Tom and Ray on Car Talk are trying to diagnose a
caller's car problems and after struggling for 5 minutes, the caller
finally mentions, "Oh, by the way, the engine check light came on" or
"It only does it when..."

I certainly hope you do not regard this as an acceptable outcome.

Nope.

I certainly hope you agree that the INIT and BACKUP commands should
not have been executed at all.

Yep.

But why was someone else's tape in the drive during backup time? Maybe
he deserves to have his tape overwritten! ;-)

I certainly hope you agree that there shouldn't have been someone
else's tape in the drive during backup time.

At my current job no one but me loads tapes. No one but me uses DCL on
the system. The tape drives are in the data center which is locked.
Only people who need access to the room are allowed in. So a command
procedure that would be okay at my site would not be okay at others.

Well I think it's safe to say that my site is not as self-contained
as yours, because the "impossible" did in fact happen. Good luck to
you and your co-workers when it happens to you.

I've been at my current job for 7 years and have been a VMS admin for
13 years and have not had any problems like this. I don't write code
like this. I did inheret some code I wasn't happy with, and I fixed
what I could with what time I had (what I could get authorized by
management to do) and things have been okay. My primary problems (with
my VMS systems and apps) at my current job have been with network hits
and outages, and hardware failures. I do the best I can given the
constraints I have to work under (I have a fair amount of non-VMS work
to do, e.g.)

I've had plenty of problems with my 4mm DAT drives, none of them due
to bad code or bad users.

I don't run code like your example and I don't write code like your
example. You're clearly not reading my posts very carefully and now
unfairly accuse me of wrongdoing. If I were in your position I'd fix
the code. But if no one else put tapes in the drive, your error
scenario wouldn't have happened.

So you're there now, you've found a problem, so fix it and be done
with it!!!

For example, you complained that the code didn't have a DEALLOCATE
command. Why is this a big problem? Could it not be, maybe, that no
one else ever uses this tape drive, in which case the lack of a
DEALLOCATE command is not a problem?

Because it's simple decent programming. You allocate a resource, you
deallocate it when you're done. You open a file, you close the file.

When I write code I do exactly these things. I this, I unthis. I that,
I unthat. Again, maybe the author of your bad code snippet was a
novice and simply didn't know better.

You reserve an event flag, you free the event flag. You release the
virtual memory you've grabbed when you're through with it. You don't
*rely* on the operating system to do it for you via LOGINOUT.EXE.
Why do I have to explain this to you?

Because you didn't read my posts carefully in which I clearly said I
don't recommend and don't write code like that. I think this is the
4th or 5th time I've had to mention this. Why do I have to explain
this to you over and over again?

Also, I follow the organized error and control-y handling method given
in "Writing Real Programs In DCL" which includes clean-up, which I was
actually drifting towards before I read the book.

I do what's appropriate for the job at hand. I take all reasonable
precautions.

Nothing personal, since I have no idea who you are, but I wouldn't
want you near any code I'm involved in, if you have such a slacker
attitude towards cleaning up. You either have good habits or you're
going to screw up . . . and from the number of posts I've seen from
you
arguing this point, I'm afraid it's the latter.

And I wouldn't want to hire someone who jumps to conclusions like you
do!

I'm afraid you're mistaken. If you look at my other posts over the
years or look at some of my code, you will see.

Please stop accusing me of wrongdoing I am not guilty of.

I'm not religious, but I do have a favorite "prayer":

O Great Spirit, may I not criticize my neighbor until I have walked a
mile in his moccasins. (Another version says "two weeks in his
moccasins".)

ok
dpm

AEF

.