OpenExtensions for z/VM "Q"s and "A"s
Question:
How do I change the control sequence prefix character in the shell?
Answer:
First, let's describe just what the "control sequence prefix
character" is.
The OpenExtensions for z/VM Shell and Utilities uses the
United States cent sign (¢) as the control sequence prefix or,
as it is referred to in the OpenExtensions for z/VM manuals, the
escape character. This is the character with which you prefix
a control character to perform the function of the control
character. For example, "¢C" performs the same
function in OpenExtensions for z/VM that "Ctrl-C" performs on
a UNIX system.
The problem here is that the U.S. cent sign is not a portable
character in non-U.S. terminal code pages. This is a special
problem with the advent of the Euro currency symbol. Also, the
OpenExtensions for z/VM Shell and Utilities hardcoded the
U.S. cent sign as the control sequence prefix.
You can use the -pfx option of the stty command to change
the control sequence character.
This option of the Shell and Utilities command, stty, allows you to
change the control sequence prefix. The syntax of the option is
stty -pfx |char|
where |char| is any character of the user's choice. The stty
command with this option may be specified on a user by user
basis or it can placed in the /etc/profile Shell and Utilities
system profile to change the control character sequence for all
users of the OpenExtensions for z/VM Shell and Utilities.
There is also a "reset control sequence prefix" option that
changes the value back to the default U.S. cent sign. To
reset the control sequence prefix issue
stty -rpfx
If APAR VM62080 is not installed on the Shell and Utilities, there is
a CMS Callable Service routine that allows you to change the shell's
escape-character. Place the following exec on a common "tools" disk on
your VM system
-------------------clip here-----------------------
/* SETESC EXEC - Set the 'EscChar' prefix */
Parse Arg inprefix .
If inprefix = '' Then inprefix = '¢'
Address OpenVM 'BPX1TSX inprefix'
Exit
-------------------clip here-----------------------
Then in the file /etc/profile you add the command
cms 'EXEC SETESC c'
where "c" is the new character you want the escape character to be.
For more questions and answers, go to our
archive of questions and answers.
|