Use this command to create a new, permanent ZFILE environment variable, to
display the environment variables that are currently defined, or to change the
value associated with an existing environment variable.
Requirements and Restrictions
- The parameters for this command are case-sensitive. You
must enter the parameters exactly as shown in the syntax
diagram.
- You can enter this command only in CRAS state or higher.
Format
- name
- is the name of the new ZFILE environment variable you want to create or
the name of the variable that has a value you want to change.
- value
- is the value to associate with the variable.
Additional Information
- Online help information is available for this command. To display
the help information, enter one of the following:
ZFILE HELP export
ZFILE HELP
ZFILE ?
In addition, the correct command syntax is displayed if you enter the syntax
incorrectly.
- If you do not specify any parameters, all ZFILE environment variables
currently defined are displayed.
- Environment variables created with the ZFILE export command exist until
removed with the ZFILE unset command or until you IPL the TPF system.
- The following environment variables are reserved for the TPF system:
- PWD
- Reserved for your current working directory. PWD is used and
overwritten by the ZFILE cd command. Modifications to this variable
will be lost without notification.
- OLDPWD
- Reserved for your previous working directory. OLDPWD is used and
overwritten by the ZFILE cd command. Modifications to this variable
will be lost without notification.
- HOME
- Reserved for your default directory. You can modify HOME to hold
the desired default directory. The ZFILE cd command will use this
default when a path is not specified. If HOME is removed using the
ZFILE unset command, the ZFILE cd command will fail if you do not specify a
path.
- PATH
- Reserved as the default location to search for executable files and
scripts. When using the ZFILE command, if the executable is not found
in the current working directory, the TPF system searches the directory
defined in the PATH environment variable. You can specify multiple
directories by separating each with a colon (:).
- Environment variable names beginning with IBM and TPF are reserved for IBM
use.
- This command does not read from the standard input (stdin)
stream.
You can redirect the standard output (stdout) stream from the
display terminal to a file by specifying one of the redirection characters
(> or >>) followed by the file name to which you want
the output written. The > character writes the output to a
file. The >> character appends the output to an existing
file.
You can redirect the standard error (stderr) stream from the
display terminal to a file by specifying one of the redirection characters
(2> or 2>>) followed by the file name to which you want
the error output written. The 2> character writes the error
output to a file. The 2>> character appends the error output
to an existing file.
- Note:
- When you use the > or 2> character, if the file that
you are redirecting data to already exists, the file is overwritten and any
data in that file is lost. If you do not want to overwrite the file,
ensure that you use the >> or 2>> character.
- The ZFILE export command is based on a subset of the export utility of the
Portable Operating System Interface for Computer Environments (POSIX)
standards.
Examples
In the following example, the PATH environment variable is changed or
created to contain multiple directories.
+---------------------------------------------------------------------------------------------+
|User: ZFILE export PATH="/usr/bin:/usr/local" |
| |
|System: FILE0003I 08:14:31 export PATH... COMPLETED SUCCESSFULLY. NO OUTPUT TO DISPLAY. |
| |
+---------------------------------------------------------------------------------------------+
In the following example, the environment variables that are currently
available are displayed.
+--------------------------------------------------------------------------------+
|User: ZFILE export |
| |
|System: FILE0001I 08:14:31 START OF DISPLAY FROM export |
| PWD="/usr/local" |
| PATH="/usr/bin:/usr/local" |
| HOME="/u/usrname" |
| END OF DISPLAY |
+--------------------------------------------------------------------------------+
Related Information