I like this name (REPLACE instead of CREAT[E]).  Prior to realizing that this 
behavior is supported with UNIX files I had pondered long and hard about the 
value.  RENEW seemed OK, but I bit of a reach.  CREAT[E] is based on the 
existing OCREAT, but REPL[ACE] could work just as well.

I had a thought after I wrote the original post with regard to the actual 
behavior of TRUNC.  If it was based on the behavior of OTRUNC it would just 
truncate the file.  But in order to work more similarly to the two step "delete 
and define" behavior, perhaps it should work that way.  This would specifically 
be desirable if the file attributes need to be changed.  For example, if the 
LRECL changes (in the program) and TRUNC didn't actually "delete and define" 
the file then there would be a file attribute mismatch.  But if TRUNC does do 
"delete and define" (and the LRECL is not specified on the JCL, but gets it 
from the program) then no JCL would need to be changed.

So the question in my mind is, should there be options for both behaviors, or 
should TRUNC (or whatever) always do an implicit DELETE and an implicit NEW?  I 
don't see any harm in the latter, but I could be missing a use case.

Frank

________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of 
Paul Gilmartin <0000000433f07816-dmarc-requ...@listserv.ua.edu>
Sent: Friday, June 30, 2017 12:37 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Possible RFE for new DISP JCL parameter options

On Fri, 30 Jun 2017 11:24:18 -0700, Charles Mills wrote:

>YES!!!
>
>Years ago I wrote and my company sold a mainframe-PC file transfer product
>(in the pre-FTP days), and it supported a DISP operand for the creation of
>mainframe datasets that worked exactly as you describe, with two steps under
>the covers. I'm trying to remember the keyword for the specification.
>Perhaps CREATE. It made sense then (1989) and it makes sense today.
>
Many desktop editors call this REPLACE; SAVE fails for an existing file.

>(It also did a kind of extended SDB under the covers. You could specify any
>one or two of LRECL, RECFM and BLKSIZE and it would intuit the others. Had
>an algorithm that made intelligent guesses. Specify RECFM=FB,BLKSIZE=8000 it
>would give you LRECL=80. Specify LRECL=137,BLKSIZE=8000 and it would give
>you RECFM=VB.)
>
What might it do for RECFM=FB,BKLSIZE=10640 (which happens to be 133 * 80).
    526 $ factor 10640
     Factors of 10640 are 2 2 2 2 5 7 19

It's ambiguous for any number with 2 or more prime factors.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to