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.
(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.) Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Frank Swarbrick Sent: Friday, June 30, 2017 10:40 AM To: [email protected] Subject: Possible RFE for new DISP JCL parameter options One MVS behavior that has annoyed me since we migrated to z/OS from VSE is the fact that MVS has no DISP option that will both create a data set if it does not already exist and simply allow its use if it does already exist. One has to "emulate" this behavior using a two step process, where step 1 specifies DISP=(MOD,DELETE) and step two specifies DISP=NEW. Since this use case exists so often (in my environment, anyway!), shouldn't there be direct JCL support, probably a new DISP option, to perform this behavior without the need for an additional step to first delete the file (if it exists) so that the DISP=NEW in the later step will always succeed? MVS *does* have such a feature for Unix system files. The following assume the default PATHDISP=(KEEP,DELETE). PATHOPTS=(ORDWR,OCREAT,OEXCL) This creates the Unix file if it does not already exist, and gives a JCL error if the file does already exist. This behavior is similar to DISP=(NEW,CATLG) for an MVS data set. PATHOPTS=(ORDWR,OCREAT) This creates the Unix file if it does not already exist, and allows the program to use the existing file when it already exists. There currently is no equivalent behavior for an MVS data set. PATHOPTS=(ORDWR,OCREAT,OTRUNC) This creates the Unix file if it does not already exist, and allows the program to use the existing file when it already exists. Additionally, when the program opens the file its file length is truncated to zero. There currently is no equivalent behavior for an MVS data set. PATHOPTS=(ORDWR,OCREAT,OAPPEND) This creates the Unix file if it does not already exist, and allows the program to use the existing file when it already exists. Additionally, the file offset is set to the end of the file after earch write, so that data is written at the end of the file. This behavior is similar to DISP=(MOD,CATLG) for an MVS data set. I would like to see two new PATH options that behave in a manner similar to the two options above that are not currently supported for MVS data sets. I suggest the following: DISP=CREAT: Similar in behavior to PATHOPTS=(ORDWR,OCREAT). DISP=TRUNC: Similar in behavior to PATHOPTS=(ORDWR,OCREAT,OTRUNC) If I make an RFE for this will you vote for it? ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
