![]() |
The environment variables for file transfer on Tectia Server for IBM z/OS can be set
in the /etc/environment file globally for all users and in the
$HOME/.ssh2/environment file for each user separately.
File transfer server uses the following environment variables:
SSH_SFTP_HOME_MVS (default: "no") SSH_SFTP_RECORD_TRUNCATE (default: "no") SSH_SFTP_STAGEFS_CACHE_SIZE_LIMIT (default: "524288000") SSH_SFTP_STAGEFS_CACHE_ENTRY_LIFETIME (default: "10") SSH_SFTP_STAGEFS_CACHE_REFRESH_INTERVAL (default: "5") SSH_SFTP_DEBUG (default: NULL) SSH_SFTP_DEBUG_FILE (default: NULL)
If SSH_SFTP_HOME_MVS is set to yes, the file transfer
server starts in the MVS side. The file transfer client sees USER prefix
as its starting directory. Default is no, the file transfer
server starts in the USS side. See Setting the File Transfer Home Location below for examples of using this variable.
The SSH_SFTP_RECORD_TRUNCATE environment variable can be used to
set the default value for the record_truncate file transfer
attribute. The valid values are yes and no. The
environment variable will be overridden by a matched transfer profile or the
advice string if they contain the record_truncate (or U)
attribute. If none of these sources is available, no will be used.
The SSH_SFTP_STAGEFS_CACHE_SIZE_LIMIT variable specifies
staging cache size in bytes. It limits the use of system resources. The
default is 524288000 bytes (500 MB).
The SSH_SFTP_STAGEFS_CACHE_ENTRY_LIFETIME variable specifies
how many seconds one cache entry is stored in the cache. After the
lifetime has expired the entry is removed from the cache and system
resources are released. The default is 10 seconds.
The SSH_SFTP_STAGEFS_CACHE_REFRESH_INTERVAL variable specifies
how many seconds may pass until the cache is refreshed. The default is 5
seconds.
With SSH_SFTP_DEBUG, the debug level can be set for the file
transfer server.
If SSH_SFTP_DEBUG_FILE is set, debug messages are stored in the
file named in the variable.
For SFTP connections, the file transfer home location is the directory on the server where the SFTP session starts. For SCP operations, the home location is the default target of the operation on the server, and directory paths are relative to the home location.
By default, Tectia Server for IBM z/OS uses the user's Unix System Services (USS) home directory as the file transfer home location.
The environment variable SSH_SFTP_HOME_MVS in the user's
$HOME/.ssh2/environment file on the server can be used to
control the file transfer home location.
If the environment variable is omitted or its value is no, the
user's USS home directory is used as the file transfer home, for example
/u/userid/, and the MVS user prefix must be accessed using
"//" or "/_".
If the value of the environment variable is yes, the user's MVS
USERID prefix is used as the file transfer home location, for example
//'USERID., and the USS home directory must be accessed using
/u/userid/ or ~.
When SSH_SFTP_HOME_MVS is set to no (or omitted), the
following put command run in the Windows SFTP client results to
a file /home/user1/dataset.txt in Tectia Server for IBM z/OS:
sftp> open user1@zos sftp> put dataset.txt
Also the following Windows SCP client command would result to the same dataset:
$ scpg3 --dst-site="X=TEXT" file.txt user1@zos:dataset.txt
The following sput command run in the Windows SFTP client
results to a MVS sequential dataset //'USERID.MF.FILE' in
Tectia Server for IBM z/OS:
sftp> open user1@zos sftp> sput remote_file //MF.FILE
The same applies to the Windows SCP client command.
When SSH_SFTP_HOME_MVS is set to yes, the following
put command in a Windows SFTP client results to a dataset
//'USER1.DATASET.TXT' in Tectia Server for IBM z/OS:
sftp> open user1@zos sftp> put dataset.txt
Also the following Windows SCP client command would result to the same dataset:
$ scpg3 --dst-site="X=TEXT" file.txt user1@zos:dataset.txt
The following sput command run in the Windows SFTP client
results to a USS file /u/user1/mf.file in Tectia Server for IBM z/OS:
sftp> open user1@zos sftp> sput remote_file ~/mf.file
Or:
sftp> open user1@zos sftp> sput remote_file /u/user1/mf.file
The same applies to the Windows SCP client command.