ADSM-L

dsmadmc keyboard input problem

2006-01-21 08:27:14
Subject: dsmadmc keyboard input problem
From: Jurjen Oskam <jurjen AT STUPENDOUS DOT ORG>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Sat, 21 Jan 2006 14:26:35 +0100
Hi there,

Some time ago, while using dsmadmc (on AIX 5.3) to do some
filespace-maintenance, I noticed that dsmadmc does something
interesting when it asks you if you really want to delete a particular
filespace.

When you enter a DELETE FILESPACE command, you're normally asked
if you really want to delete the filespace, with a prompt indicating
that dsmadmc want a Y or a N for an answer.

I noticed that dsmadmc doesn't care what you type, as long as the first
character is either a Y or a N (or the lower case variant). For example,
typing "nyes" will not delete the filespace, typing "yno" *will* delete
the filespace.

While this is debatable (IMHO), this gets nasty when you combine this
with how dsmadmc handles other input, like, say, Backspace. I have
tried on two types of Unix terminal emulators: PuTTY (xterm, send Backspace
as Ctrl-?), and the HMC supplied virtual terminal (vt320).

When entering commands, keys like the cursor keys and backspace work
and do what you'd expect. Backspace deletes the character left of the
cursor. If I type: "q pg<backspace>r<enter>", I get the output of the
QUERY PROCESS command, as expected. However, when I enter a DELETE
FILESPACE command and dsmadmc asks me if I'm really sure, and I type:
"y<backspace>n<enter>", the deletion *will* occur, i.e.: the filespace
is *gone*. Depending on the terminal I've seen "y^Hn" or just plain "n"
(which is particularly nasty), but once you've typed the initial "y"
there's no way except Ctrl-C to prevent the deletion.

I then changed (on the PuTTY) session my TERM environment variable to
"dumb". This caused the Backspace-key to work as generally expected
when I was asked if I was sure to delete the given filespace. However,
it *also* caused the Backspace key to not work at all during normal
command entering.


I am aware that Unix and terminal emulation can be a tricky issue, but
I believe there *is* a problem in dsmadmc in this case, because it
treats the same keypress (Backspace) differently in different parts of
the program. Also, the fact that dsmadmc only looks at the first character
of input when asking a Y/N-question, is IMHO not quite correct.

What do you think?

--
Jurjen Oskam

<Prev in Thread] Current Thread [Next in Thread>