Mainframe systems have some specifics. Some of those are addressed below.
WinSCP in general requires the server to follow *nix path semantics – hierarchical paths starting with a slash, with individual path components separated by slashes.
This is not a problem, if your server supports SFTP protocol, as the SFTP protocol itself mandates *unix-like path format. So even if the server itself uses a different native path format, it has to emulate the *nix format for SFTP.
On the contrary, FTP protocol does not have such requirement. It allows the server to keep its native path format. WinSCP has limited support for working with such paths. In some cases it can work, but not always.
Some servers allow switching to *nix path format optionally. For example to configure IBM Power Systems (IBM System i, eServer iSeries, AS/400) for Unix/WinSCP compatibility, use following two Post login commands:
site namefmt 1 site listfmt 1
To set record length or other parameters for files that are about to be uploaded, use the methods described below.
Execute a similar command from Console window:
SITE FIXrecfm 128 Lrecl=128 Recfm=FB BlockSize=6144
call SITE FIXrecfm 128 Lrecl=128 Recfm=FB BlockSize=6144
$session.ExecuteCommand("SITE FIXrecfm 128 Lrecl=128 Recfm=FB BlockSize=6144")
SFTP protocol does not have a generic way to execute server-specific commands, like FTP does with its
SITE command. For this reason, mainframe SFTP servers allow passing parameters using a special syntax of a path provided to a directory listing request.