zowe › zos-ftp › upload › file-to-data-set
Upload contents of a local file to a z/OS data set
Usage
zowe zos-ftp upload file-to-data-set <file> <dataSet> [options]
Positional Arguments
file
(local file path)- Upload the contents of this file to the data set
dataSet
(string)- The data set (PDS member or physical sequential data set) to which you would like to upload content.
Options
--binary
|-b
(boolean)- Upload content in binary mode.
--dcb
(string)- DCB parameters for dataset allocation if not existing. It's space separated like RECFM=FB LRECL=326 BLKSIZE=23472
--secure-ftp
(boolean)Set to true for both control and data connection encryption, 'control' for control connection encryption only, or 'implicit' for implicitly encrypted control connection (this mode is deprecated in modern times, but usually uses port 990). Note: Unfortunately, this plugin's functionality only works with FTP and FTPS, not 'SFTP' which is FTP over SSH.
Default value: true
--connection-timeout
|--ct
(number)How long (in milliseconds) to wait for the control connection to be established.
Default value: 10000
Required Options
--host
|-H
(string)- The hostname or IP address of the z/OS server to connect to.
--port
|-P
(number)The port of the z/OS FTP server.
Default value: 21
--user
|-u
(string)- Username for authentication on z/OS
--password
|-p
|--pass
|--pw
(string)- Password to authenticate to FTP.
TLS / Secure Connection options
--reject-unauthorized
|--ru
(boolean)- Reject self-signed certificates. Only specify this if you are connecting to a secure FTP instance.
--server-name
|--sn
(string)- Server name for the SNI (Server Name Indication) TLS extension. Only specify if you are connecting securely
Profile Options
--zftp-profile
|--zftp-p
(string)- The name of a (zftp) profile to load for this command execution.
--base-profile
|--base-p
(string)- The name of a (base) profile to load for this command execution.
Base Connection Options
--token-type
|--tt
(string)- The type of token to get and use for the API. Omit this option to use the default token type, which is provided by 'zowe auth login'.
--token-value
|--tv
(string)- The value of the token to pass to the API.
Examples
Upload to "ibmuser.cntl(iefbr14)" from the file iefbr14.txt:
zowe zos-ftp upload file-to-data-set iefbr14.txt "ibmuser.cntl(iefbr14)"
Upload to "ibmuser.cntl(iefbr14)" from the file iefbr14.txt with the DCB parameters:
zowe zos-ftp upload file-to-data-set iefbr14.txt "ibmuser.cntl(iefbr14)" --dcb "RECFM=FB LRECL=326 BLKSIZE=23472"