Zos filename gets allocated incorrectly

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
LeonBylsma
Posts: 22
Joined: Thu Apr 16, 2009 8:26 am

Zos filename gets allocated incorrectly

Post by LeonBylsma »

We are currently running the Co:Z Toolkit for z/OS - version 1.4.1 on our mainframes.
We have a ftp client that uses OpenSSH via c# Application to send us files to our mainframe to a user called ftp05003. They do a put command in C# such as this :
put(“D:\Projects\FINDATA SLOW\FINDATA.SLOW.TransactionService\bin\transactions \ACCI.FINDATA.D100112.T1200”, “ACCI.FINDATA”) which then results in the file on the Zos side to be called FTP05003.ACCI.FINDATA.ACCI.FINDATA.D100112.T1200 (see actual mainframe log entries in trace mode below):

BPXF024I (FTP05003) 76.080 open "//FTP05003/ACCI.FINDATA/ACCI.FINDATA.D100112.T1200" flags WRITE,CREATE,TRUNCATE mode 0666

and since this file name is too long for the mainframe, it ends in error. It seems as if the 'put' command will result in the filename on Zos to be a named a combination of the local and remote file names from the ftp client side. Any suggestions?
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

With SFTP, the client always determines the remote file name. Most clients use the current directory plus the file name. I can't really tell what your C# client is doing - can you please run a trace and post the output?

To do this, add (or uncomment) the following int the user's profile (in ~/.ssh/sftp-server.rc)

export SFTP_SERVER_OPTIONS="-e -l debug3"
export COZ_LOG=T

A trace will be written to the user's sftp session log, which by default is in /tmp/sftp-server.userid.time.nnnn.log
Post Reply