SFTP Put to GDG on Z/OS

A discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
TGibson
Posts: 10
Joined: Thu Jul 06, 2017 11:08 am

SFTP Put to GDG on Z/OS

Post by TGibson » Thu Sep 07, 2017 3:23 pm

I'm running a client on Linux and putting a file to a GDG dataset on Z/OS. When more than one process attempts to write to the same GDG using (+1) I get a collision and the message in the log is that the dataset is already in use. Is there an option where the SFTP server on the Z/OS side could wait for the allocation?

Setting COZ option /+mode=text,lrecl=27994,blksize=0,recfm=vb,unit=disk,space=cyl.1.5,release,gdgnt

atasetÝI¨: Opening dataset C00605.FG.GDG(+1) for write with options: blksize(0)
gdgnt lrecl(27994) recfm(v,b) release cyl space(1,5) unit(disk) new catalog.Data
setHandlerÝT¨: -> open().IKJ56225I DATA SET C00605.FG.GDG ALREADY IN USE, TRY LA
TER+ .IKJ56225I DATA SET IS ALLOCATED TO ANOTHER JOB OR USER .IEFA110I DAT
A SET CONTENTION .DATA SET C00605.FG.GDG IN USE BY .SYSNAME JOBNAME ASID
.SY6 MDTFTP9 01F6 .DatasetHandlerÝE¨: BPXWDYN allocation failed
S99ERROR=0x0210 S99INFO=0x0000.DatasetHandlerÝE¨: BPXWDYN command was: "alloc f
i(SYS00007) reuse msg(2) da('C00605.FG.GDG(+1)') blksize(0) gdgnt lrecl(27994) r
ecfm(v,b) release cyl space(1,5) unit(disk) new catalog".
DatasetHandlerÝT¨: <- o
pen().DatasetHandlerÝE¨: Dataset C00605.FG.GDG(+1) open error: EDC5000I No error
occurred. (errno2=0xC4070044).ZosDatasetÝT¨: <- open().DatasetHandlerÝT¨: -> cl
ose().DatasetHandlerÝT¨: -> freeDD(SYS00007).IKJ56247I FILE SYS00007 NOT UNALLOC
ATED, IS NOT ALLOCATED .DatasetHandlerÝT¨: <- freeDD(rc=70778880).DatasetHand
lerÝT¨: <- close().Ý95.442¨ debug3: request 4: sent status 4.Ý95.442¨ sent statu

dovetail
Site Admin
Posts: 1776
Joined: Thu Jul 29, 2004 12:12 pm

Re: SFTP Put to GDG on Z/OS

Post by dovetail » Tue Sep 12, 2017 12:17 pm

No, there is not an option to wait for an allocation.

TGibson
Posts: 10
Joined: Thu Jul 06, 2017 11:08 am

Re: SFTP Put to GDG on Z/OS

Post by TGibson » Thu Sep 14, 2017 9:43 am

I was afraid of that. Could that be a future enhancement to build in a retry or wait for the dataset to get free of its allocation?

Post Reply