Yes, a DISP=(MOD,CATLG) defaults to DISP=(NEW,CATLG) if the DSN does not exist.
The following *might* be invalid, as it would be referring to a GDG entry DSN that already exists (but it might also just issue a 'NOT CATLG 2' or similar JES2 log message): "//SMFOUT DD DSN=SMFHLQ.DAILY.SMFDSN(0), " "// DISP=(MOD,CATLG,DELETE) " <--- not 'CATLG' again It would 'correctly' have to be: "//SMFOUT DD DSN=SMFHLQ.DAILY.SMFDSN(0), " "// DISP=(MOD,KEEP,KEEP) " Why not try it using a test GDG hlq DSN and/or on a test LPAR to see what happens, regardless of JCL checks? My ha'penny. CP On 08/10/2018 18:38, Lizette Koehler wrote: > The question was not about the JCL Check process returning a 4 or an 8 > > > It was more on when using DISP=MOD, would any of the sample provided be > against > JCL rules? > > My understanding is if DISP=MOD is used, then if the dataset does not exist, > create it, if it does exist append to it. > > Just trying to understand why some might think these sample coding is invalid. > > Thanks > > Lizette > > >> -----Original Message----- >> From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of >> Lizette Koehler >> Sent: Friday, October 05, 2018 3:50 PM >> To: IBM-MAIN@LISTSERV.UA.EDU >> Subject: Question on DISP=MOD and GDGs >> >> List - >> >> I am having a discussion on how a GDG is handled based on the DISP. I was >> always working from the position that the use of MOD changes JCL behavior >> slightly with a dataset. My understanding is: If using MOD then if the >> dataset does not exist, it is treated as NEW and if it exists then treated as >> OLD. That seems reasonable, however, I have some users coding this for GDGs >> and I am not sure why they should work. >> >> >> Now the following are samples and I am sure there are other coding that I >> have not included. >> >> >> >> So based on the following, which should be considered incorrect coding >> >> 1) First time creating the new Daily dataset. There is also a concern on the >> second coding >> >> >> //SMFOUT DD DSN=SMFHLQ.DAILY.SMFDSN(+1), >> // DISP=(MOD,CATLG,DELETE), >> // STORCLAS=NONSMS,EXPDT=99000, >> // RECFM=VBS,BLKSIZE=32000,LRECL=32760,BUFNO=10, >> // UNIT=TAPE >> *** WARN 04: DISP FOR NEW GDG DATASET IS NOT (NEW,CATLG) >> >> Appending SMF data daily dataset >> >> //SMFOUT DD DSN=SMFHLQ.DAILY.SMFDSN(0), >> // DISP=(MOD,CATLG,DELETE >> *** WARN 04: DISP FOR NEW GDG DATASET IS NOT (NEW,CATLG) >> >> >> >> 2) Using BR14 with MOD DELETE for a GEN that has NOT been created >> >> //S1 EXEC PGM=IEFBR14 >> //GDGBASE DD >> DISP=(MOD,DELETE,DELETE),DSN=TSOHLQ.GDGTEST(0),SPACE=(TRK,(1,1)),UNIT=SYSDA >> !!!ERROR 04: GDG(0) NOT PERMITTED WITH DISP=NEW >> >> >> GDG does not have any GENs yet. So get the following >> >> //COPYIT1 EXEC PGM=IEBGENER >> //SYSPRINT DD SYSOUT=* >> //* >> //* >> //SYSIN DD DUMMY >> //SYSUT2 DD DISP=(MOD,CATLG,DELETE),UNIT=SYSDA, >> // SPACE=(CYL,(1,1),RLSE), >> // DSN=TSOHLQ.GDGTEST(+1) >> *** WARN 04: DISP FOR NEW GDG DATASET IS NOT (NEW,CATLG) >> //SYSUT1 DD * >> TEST RECORD >> >> >> The GDG has one generation in the base I am able to see this should work >> >> //**************************************************************** >> //* >> //**************************************************************** >> //S1 EXEC PGM=IEFBR14 >> //GDGBASE DD DISP=(MOD,DELETE,DELETE),DSN=TSOHLQ.GDGTEST(0) >> >> >> I am not saying these are great ways to code DISP=MOD, just that I have seen >> this coding work but have been told that they should not work or they would >> cause weird/crazy results >> >> >> Any and all opinions welcome. >> >> >> >> Thanks >> >> >> Lizette Koehler >> statistics: A precise and logical method for stating a half-truth >> inaccurately >> >> ---------------------------------------------------------------------- >> 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 > . > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN