Data Corruption

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
kciapanna
Posts: 1
Joined: Fri Apr 12, 2013 2:53 pm

Data Corruption

Post by kciapanna »

Is there information anywhere that details how datasets are handled during the write process from the GET or PUT command? It appears that we have multiple systems that are using SFTP to the same file. On occasion the data is corrupted, as if the file is open for two systems who are sftping data at the same time. Is there a way to do an exclusive hold on a file until the GET or PUT command is finished?
dovetail
Site Admin
Posts: 2025
Joined: Thu Jul 29, 2004 12:12 pm

Re: Data Corruption

Post by dovetail »

Data sets are allocated with BPXWDYN.
The only exception is that if you are using the Co:Z SFTP *client* using //DD:SOMEDD.

Output datasets are allocated with:

DISP=(new,catlg) for new datasets
DISP=OLD for existing datasets, but this can be changed if you set option DISP=SHR or DISP=MOD

For more information, see: http://dovetail.com/docs/sftp/options.h ... ns_bpxwdyn

So, there are only two scenarios where you could have two jobs writing to the same dataset at the same time:

1) Using the client in a batch job with a DD that is allocated in JCL with DISP=SHR
2) Using option DISP=SHR, which is not the default.

If you are using the server, you should be able to look at the server log file to see the allocation of data sets.
Post Reply