A SERVICE OF

logo

Chapter 11 249
Utilities
set_complex
set_complex can be invoked anytime the user wants to change the shell
default complex. If the user enters an invalid COMPLEX_NAME, the
default complex becomes unset and the prompt string indicates this
condition. If the user does not enter a COMPLEX_NAME, the complex name
remains set (assuming it is still a valid complex).
set_complex does not work from within a shell script. An alternative is
to explicitly set the COMPLEX_NAME environment variable using the
appropriate mechanism for the current shell script type.
Example showing change of complex name in a shelll script
+++++++++++++++++++++++++++++++++++++++++++
+#!<shell> +
+ +
+ COMPLEX_NAME=hw2a; export COMPLEX_NAME + (sh/ksh/sppdsh)
+ <OR> +
+ setenv COMPLEX_NAME hw2a + (csh/tcsh)
+ +
+ dcm 0 +
+ ... +
+++++++++++++++++++++++++++++++++++++++++++
NOTE Scripts that are run from a shell using set_complex receive the correct
COMPLEX_NAME environment variable from the parent shell. The
limitation is that set_complex cannot set the COMPLEX_NAME
environment variable when run from within a script.