Dovetailed Technologies Solutions Support Contact Us

Appendix A. Co:Z SFTP options

A.1 General transfer options

The following table describes the general transfer options. The usage columns describe when the option (if active) will apply during transfer. Usage Read means using Co:Z SFTP (server or client) to read a z/OS file. Usage Write means using Co:Z SFTP (server or client) to write a z/OS file.

[Note]Note

Options that have a blank value column are on/off options. They are activated by supplying the option name by itself (no values allowed) and deactivated by prefixing the option name with the prefix NO. For example: trim and notrim.

Table A.1. General transfer options

KeywordUsage
NameValueDatasetsPOSIXReadWrite
clientcp<codepage>XXXX
linerulecr | crlf | crnl | lf | nl | rdw | mfrdw | flexible | 0xbb[bb..] | noneXXXX
modebinary | textXXXX
overflowerror | flow | trunc | wrapX X
pad<pad_char> | 0xbbX X
replace XX X
servercp<codepage>XXXX
technique<technique_string>XXXX
trim X X

clientcp

Specifies the name of the client codepage used when performing text mode transfers. Data will be converted between the server codepage (servercp) and this code page. The codepage must either be a single byte codepage or any multi-byte codepage that has single-byte line terminators (e.g. UTF-8). The z/OS Unix command iconv -l lists the available codepages. The default, if not specified, is ISO8859-1.

linerule

The values cr, crlf, crnl, lf, nl specify that, for text mode transfers, lines will be terminated with the given characters in the client codepage. flexible may be used when writing to files or datasets to indicate that any combination of cr, lf, or newline will be recognized as a line terminator. rdw specifies that IBM-style RDWs are used as prefixes. mfrdw indicates that Micro-focus file and records headers are used. 0xbb[bb..] may be used to specify a sequence of one or more bytes in the source codepage. The default is flexible for writing and lf for reading.

mode

Specifies whether transfers are as-is (binary) or subject to codepage/linerule/overflow/pad processing (text). The default is binary.

overflow

For text-mode dataset write processing, controls the treatment of lines longer than the maximum dataset record length.

pad

For text-mode dataset write processing, specifies the character to use when padding lines into fixed-length dataset records. If given as 0xbb, it specifies (in hex) a single-byte character in the source codepage. If not specified, the default is a space character in the server codepage.

replace

This setting allows for existing datasets or files to be replaced. The default, if not specified, is replace, which allows for replacement. noreplace can be set to prevent an existing dataset or file from being replaced. Note: if noreplace is set, you may not create PDS members, regardless of whether the member exists, and you may also not write to GDG datasets using a positive (+n) relative reference.

servercp

Specifies the name of the server codepage used when performing text mode transfers. Data will be converted between the client codepage (clientcp) and this code page. The default, if not specified, is default codepage for the server's process.

technique

Specifies the Codepage conversion technique string. Used to override the default Unicode Services value of LMREC. For more information, see IBM's Unicode Services User's Guide and Reference (SA22-7649).

trim

For text-mode dataset read transfers, enabling this options will cause pad characters to be trimmed from the dataset records as they are read.

A.2 Miscellaneous options

The following table describes the miscellaneous options. These options do not apply to transfer operations, but affect the behavior of Co:Z SFTP.

Table A.2. Miscellaneous options

NameValueNotes
loglevel

E | W | N | I | D | T | F

Sets the logging level of the Co:Z sftp-server. The UPPER CASE values correspond to the list: (Error, Warning, Info, Notice, Debug, Trace, Fine).
reqexits

exit[.exit]...

(server only) For each exit listed, the corresponding loadmodule must be available and loaded. If not, an error message will be written to the log and the server session immediately terminated. The exit names that may be specified are: CZCHKCMD, CZCHKIP, CZCHKPWD, and CZPOSTPR. Installations that use exits will typically set this option in the fixed: section of /etc/ssh/cozsftp_server_config.
showall If active, all options will be shown on option display (ls /+). Inactive options are shown with a prefix of NO.
smf If active (the default), SMF 119 records will be written for file transfer events. if a failure occurs because SMF is disabled, this option will be automatically set to NOsmf and no further attempts will be made. To completely disable SMF recording supply "nosmf" in one of the config files: Appendix B, Session config files. This option may not be set or changed after the session has started.
ssh-le-options (Co:Z SFTP client only) This option may be used to supply z/OS Language Environment options for the IBM Ported Tools ssh command when it is invoked by cozsftp.

This option may not be set or changed once the session has started.

Referring to IBM APAR OA34819, we suggest that customers adopt the value for this setting that is in the sample cozsftp_config file supplied with the distribution.


A.3 Dataset allocation options

The following table describes options that apply when transferring MVS datasets. The z/OS BPXWDYN service is used for dataset allocation and these options correspond to keywords available with BPXWDYN with similar syntax except that:

  • keyword=value is used rather than keyword(value)

  • periods are used in place of commas

  • other minor differences as described below

The usage columns below describe when the option (if active) will apply during dataset transfer (none of these options, with the exception of conddisp, apply during POSIX file transfers). For more information on BPXWDYN, see Using REXX and z/OS UNIX System Services - SA22-7806

[Note]Note

The conddisp option is not a BPXWDN keyword, but is supported by Co:Z SFTP to handle dataset / POSIX file deletion in the result of a transfer error. If this option is set to delete, Co:Z SFTP server will attempt to delete any file or dataset that is being written to (on the client or the server) if the transfer is interrupted. In the OpenSSH sftp client, a Ctrl-C (SIG-INT) is caught in the client and it just closes the file, so there is no way for the server to see this as an interruption. In this case, it is still the client's responsibility to clean up the file.

Table A.3. BPXWDYN options

KeywordUsage
NameValueReadWrite NewWrite ExistingSysout
blksize<numeric> X X
bufno<numeric>XXX
conddispcatlg | deleteXXXX
copies<numeric> X
dataclas<alphanum> X
destdest[.user] X
dir<numeric> X
dispold | shr | mod | newXXX
dsntypelibrary | pds | large | extreq | extpref | basic X
dsorgps | po | da X
forms<alphanum> X
gdgnt  X
hold  X
labelnl | sl | nsl | sul | blp | ltm | al | aul X
like<Dataset Name> X
lrecl<numeric> X X
maxvol<numeric> X
mount XXX
mgmtclas<alphanum> X
norecall X X
outdes<alphanum> X
recfm<alphanum> X X
release XXX
retpd<numeric> X
sequence<numeric> X
space[blk. | trk. | cyl.]primary[.secondary] X
spinunalloc X
storclas<alphanum> X
sysout<sysout_class> X
trtchnoncomp | comp | c | e | et | t X
ucount<numeric>XXX
unit<alphanum> X
vol<alphanum> X
writer<alphanum> X

Copyright 2009 Dovetailed Technologies, LLC. All rights reserved.