Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
The IDCAMS step will define the new gdg.
The IEFBR14 step can cause problems. Creating a +1 with BR14 basically makes a catalog entry and allocates space. If an open/read is issued to a file created by this method there may be problems. This is NOT a truly empty file - it has no end-of-file mark. There have been posts lately from people who have had problems with allocated but not usable files.
I'd recommend doing the DEFINE but letting a "real" job create the new version(s). That way abends may be avoided.
What is doing second step,idcam create the gdg,remain step what will do
STEP2 EXEC PGM=IEFBR14
//MODEL1 DD DSN=TBH2.DECE001.DATA(+1),DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(10,25),RLSE),UNIT=DISK,
// DCB=(LRECL=145,RECFM=FB)
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Yes, it will create a new version.
The new version will have no data in it and if it is not on an SMS dasd, it may cause problems (it won't have an end-of-file). If the previous data at that place on the disk had the same dcb info as the "new" file, a program reading it will either abend (i.e. s0c7) or produce incorrect results. If the dcb info does not match, the program typically abends with an s013-20.
Is there a business reason to have gdg version of this kind?
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Please explain what you mean by "create a new version G001V01".
Once a generation is created, you typically will not want/need to create a "new" file with that same version.
If you have created a version with incorrect/imcomplete data, uncatalog/delete that version and re-run the process that created the (+1) version.
Keep in mind that if you try to catalog a "new" G001V01, and one already exista, that will fail.
Another consideration with GDG datasets is that normally the relative version number (i.e. 0, -1, +1, etc) is used to reference the dataset. There is little reason to code specific GxxxVx levels in your JCL.
If you want to create/use a dataset and then create a "new" one, you don't need to define it as a GDG.