Create a GDG base

How to create a GDG base, GDG version and read that version and create the next GDG version in the same job?

Questions by ravtej556

Showing Answers 1 - 6 of 6 Answers

tag_tushar

  • Jul 1st, 2010
 

To create GDG Base:
//JOB1 JOB NOTIFY=&SYSUID
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT *
//SYSIN DD *
DEFINE GDG -
( NAME(ABC.XYZ.BASE) -
EMPTY -
LIMIT(8) -
SCRATCH -
)
/*

GDG version:
//JOB2 JOB NOTIFY=&SYSUID
//STEP1 EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT *
//DD1 DD DSN=ABC.XYZ.BASE(+1),DISP=(NEW CATLG DELETE),
//DCB=(LRECL=80,RECFM=FB,BLKSIZE=800),UNIT=SYSDA,
//SPACE=(TRK,(1,1),RLSE)
//SYSIN DD DUMMY
/*
Upon submition, again & again new version would be created...

To read the version file just type PRINT CH IDS(/) in front of the file name in the ISPF Menu. The file will would open for you to see.

  Was this answer useful?  Yes

tag_tushar

  • Jul 2nd, 2010
 

To create a base file:
//JOB1 JOB NOTIFY=&SYSUID
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT *
//SYSIN DD *
DEFINE GDG -
(NAME(ABC.XYZ.BASE) -
EMPTY -
LIMIT(8) -
SCRATCH -
)
/*

To create a create version of the base file ABC.XYZ.BASE.
//JOB2 JOB NOTIFY=&SYSUID
//STEP1 EXEC PGM=IEFBR14
//SYSPRINT DD SYSUT *
//DD1 DD DSN=ABC.PS.BASE(+1),DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=800),UNIT=SYSDA,
// SPACE=(TRK,(1,1),RLSE)
//SYSIN DD DUMMY
/*
Upon submitting above JCL again & again newer version would be created.

To open a version file in ISPF Menu, just type PRINT CH IDS(/) infront of the file & the file will open.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions