Discussion:
backspace key won't under db2 command line window?
(too old to reply)
mozilla
2010-06-12 20:51:49 UTC
Permalink
hi,
I connect to db2, but the backspace key does not work...
anyone kow what is problem?

i use csh

thx
Mark Johnston
2010-06-13 00:40:55 UTC
Permalink
I'm not sure why that problem is occurring, but I've noticed that the
db2 frontend handles backspaces properly if I ssh into rees, rather than
using rlogin.

It's not really a big deal though, writing complex queries without
readline support is painful. It's better to execute SQL from a file.

-Mark
Post by mozilla
hi,
I connect to db2, but the backspace key does not work...
anyone kow what is problem?
i use csh
thx
Leqi Zhu
2010-06-13 02:37:13 UTC
Permalink
Post by mozilla
hi,
I connect to db2, but the backspace key does not work...
anyone kow what is problem?
i use csh
thx
I remember this bugging the heck out of me in second year... If I recall
correctly, you're getting weird characters showing up when you hit
<backspace> because your terminal program has a different ascii char it
expects for backspace in comparison to one on rees (ie. when you hit
<backspace> in your terminal it sends X to the rees terminal but the
rees terminal expects Y as <backspace>). The solution would be to do the
following (in a terminal connected to rees):

stty erase CTRL-V <BACKSPACE> (hold CTRL-V down and then hit backspace)

"CTRL-V <BACKSPACE>" returns the actual ascii character being sent over
when you hit <BACKSPACE> (as you'll soon see), and "stty erase" sets the
terminal to respond to that for backspace. I think if you do this once
it's set for life. (You might have to logout and log back in, don't
quite remember.) Good luck!
Leqi Zhu
2010-06-13 02:38:12 UTC
Permalink
Post by mozilla
hi,
I connect to db2, but the backspace key does not work...
anyone kow what is problem?
i use csh
thx
(Of-course, as Mark noted, it's definitely better to do your stuff in a
file and then run db2 -f "file-name".)

Loading...