Page 2 of 2

Re: GDG

PostPosted: Tue Jan 17, 2012 2:52 am
by Robert Sample
although i have seen in the very very dim and distant past, where jobs created multiple new generations in the same job. Today i find this extremely unlikely.
Actually, our site has production jobs doing this every day. Backups are taken at the start and end of certain jobs, using +1 and +2 generations.

Re: GDG

PostPosted: Tue Jan 17, 2012 3:16 am
by steve-myers
I'm not so sure we should challenge the idea of creating more than 1 new generation in a job. Presumably there is a need for it, but we are too distant from the job to challenge the idea.

The way I view halfteck's discussion is that the mapping of a relative generation to a true dataset name is effectively established with the first locate performed by job management for the job, and it remains fixed for the remainder of the job, even if the true dataset is explicitely deleted. In other words, JCL like this is pefectly valid, thoughI must admit I've never seen it in 40+ years working with OS/360 and it derivatives.
//A       EXEC PGM=IEBUPDTE
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  DISP=(OLD,DELETE),DSN=xxx(-1)
//SYSUT2   DD  DISP=(,PASS),UNIT=SYSDA,
//             SPACE=(CYL,(1,1)),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//SYSIN    DD  *
./ CHANGE
...
//B       EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  DISP=(OLD,DELETE),DSN=*.A.SYSUT2
//SYSUT2   DD  DISP=(NEW,CATLG),DSN=*.A.SYSUT1,...
//SYSIN    DD  DUMMY
Obviously the first step is some sort of update program, probably not IEBUPDTE. Before SMS this probably could be done in one step. As written, this is much too dangerous, but that's not part of this discussion.