On Tue, 6 Dec 2016 15:15:54 -0600, Kirk Wolf  wrote:

>As many are aware, z/OS Comm Svr FTP uses DISP=SHR + ISPF compatible ENQs
>when writing PDS members.
>
(Curiously, last I looked, the ISPF doc is in the install/config guide.)
NFS does likewise.  And NFS (I'm guessing FTP) creates ISPF compatible directory
user info.

Anyone for an RFE for /bin/cp  to do likewise?

>See for example this message for evidence:
>=======================
>EZA2563W
>Data set dsname used exclusively by someone else.
>Explanation:
>
>A data transfer (get, put or append) of a partitioned data set (PDS) was
>requested and the member requested is currently in use.
>====================
>I am curious about how this actually works, specifically how/when FTP holds
>the exclusive *data set* ENQ  (QNAME=SPFEDIT,RNAME=DSN).    This would be
>the (hopefully short) ENQ that is held while actually doing I/O to the data
>set.
>
I believe that for the duration of the edit, ISPF holds an exclusive ENQ
incorporating the member name.

LM services LMPUT requires an exclusive ENQ on DSN.  LM, like BPAM,
may not know the member name until STOW.

>What would happen if the FTP transfer started, this data set ENQ was
>obtained, and then the transfer hung for some period of time?    Wouldn't
>that be bad?   Or, perhaps FTP buffers the data for a PDS member write in
>memory until it has the complete member before doing I/O?
>
Have you stress-tested it?  Think of storage exhaustion.  Think of a
temporary data set.

The rules for PDSE are much more lenient: multiple members may be
written concurrently.  Separate DCBs in the same job.  I've tested with
LM services.  Can't use different jobs because of the ENQ EXC constraint
menioned above.  *But* that may be just an LM restriction only to
protect against member name conflict since the member name may be
unknown until STOW.

Solaris FTP allows a pipe as input, so one of us could try throttling FTP
PUT.

I'll try to attach my PDSE test EXEC.

-- gil


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
/* Rexx */ signal on novalue;  /*
   Doc: ISPF LM concurrent update to PDSE members?
*/
trace Err
address 'ISREDIT' 'macro (Arg)'

parse value  1 5 userid()'.TEMP.PDS'  with MaxM MaxL DSN
parse value  5 5 userid()'.TEMP.PDSE' with MaxM MaxL DSN
RC = BPXWDYN( 'alloc rtddn(Dir) new catalog dsntype(LIBRARY) dsorg(PO) 
recfm(v,b) lrecl(222) dsn('DSN') msg(WTP)' )
say RC Dir DSN 'New'
RC = BPXWDYN( 'alloc rtddn(Dir) old dsn('DSN') msg(WTP)' )
say RC Dir DSN 'Old'
trace Err

address 'ISPEXEC'
do M = 1 to MaxM
    'LMINIT DATAID(ID'M') DDNAME('Dir')'
    if RC<>0 then return( Report() )
    'LMOPEN DATAID('value( 'ID'M )') OPTION(OUTPUT)'
end M

do L = 1 to MaxL
    do MM = 1 to MaxM
        M = ( MM + L ) // MaxM + 1
        S = 'Record' L ' Member MEM'M MM right( time( 'L' ), 43 )
        if 0 then parse value 'MULTX' d2c( length( S ), 2 )S ,
                  with Mode S
           else Mode = 'INVAR'
        'LMPUT DATAID('value('ID'M)') MODE('Mode') DATALOC(S)' ,
            'DATALEN('length(S)') NOBSCAN'
         if L==MaxL then do
            C = 'LMMREP DATAID('value( 'ID'M )') MEMBER(MEM'M')'
            C;  say RC C
            'LMFREE DATAID('value( 'ID'M )')';  end
    end MM
end L

return( BPXWDYN( 'free  dd('''Dir''') msg(WTP)' ) )

Report:
    say RC value( 'ZERRMSG' )
    say value( 'ZERRSM' )
    say value( 'ZERRLM' )
    return( RC )



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to