MPE/iX Commands Reference Manual (32650-90877)

112 Chapter4
Command List II
Commands CALC thru COPY
Syntax
CHDIR[ [DIR=]
dir_name
] [;SHOW | NOSHOW]
Parameters
dir_name
The name of the directory you want to change to, which is assumed to be
an MPE name unless you specify otherwise. To change to an HFS-named
directory, begin
dir_name
with a dot (.) or a slash (/). The
dir_name
may
not end in a slash, and using wildcards is not allowed.
This parameter is optional. If you omit
dir_name
, CHDIR switches you to
your logon directory, which is your logon group in the form
/LOGON_ACCOUNT/LOGON_GROUP in all uppercase letters.
SHOW Displays the absolute pathname of the new directory on $STDLIST. SHOW
is the default.
NOSHOW Does not display the absolute pathname.
Operation
The CHDIR command changes the process' current working directory to
dir_name
or to the
logon group, if you omit
dir_name
. You can change the CWD to any HFS directory if you
precede
dir_name
with a dot (.) or a slash (/) or to an MPE account or group to which you
have the appropriate permission.
Issuing the CHDIR command does not give users access to files in a directory (or group and
account) that they would not otherwise have. That is, it has no affect on file access
permissions.
The CWD is a process-local attribute, which means that CHDIR changes the CI's CWD for
the life of that CI process or until another CHDIR command is issued. When CHDIR is
executed programmatically from a child process of the CI (e.g., HPEDIT), only that process'
CWD is changed; the CWD of the parent process (in this example, the CI) remains the
same.
CHDIR does not post any accounting information: Connect and CPU time are still accounted
to the user's logon account and group.
HPCWD is a read-only, CI string variable that contains the name of the current working
directory in HFS syntax. At logon, HPCWD contains
/account_name/logon_group_name
.
The CHGROUP command causes the HPCWD variable to be set to
/account/group_changed_to
.
The following table summarizes the differences and similarities between the CHDIR and
CHGROUP commands.
Table 4-3. CHGROUP vs. CHDIR command
Affects CHGROUP CHDIR
Accumulation of CPU and Connect times yes no
Set of accessible files yes no
CWD of process yes yes