How to create a list of all GDG Base names using CA Disk or CA Vantage

book

Article ID: 128425

calendar_today

Updated On:

Products

CA Disk Backup and Restore - MVS CA DISK BACKUP AND RESTORE- ADD-ON OPTIO CA DISK BACKUP AND RESTORE

Issue/Introduction

How to create a list of all GDG Base names?

Environment

Release:
Component: DISKOS

Resolution

1) Using Vantage 
If Vantage is an option, creating a list of all GDG Base names is an easy task.
Create a user view on the "GDG Data Sets object (OBJ02016)" and select the GDG Bases by specifying filter "ETypeC = B" (B for Base). 
In addition, you can use an "Input List" to limit the list to certain data set hlq's. 


2) Without Vantage
If Vantage is not an option, you can use the IDCAMS command LISTCAT GENERATIONDATAGROUP to list all GDG Base names.
By adding LEVEL(hlq) you can limit that list to a certain hlq.

Here the sample JCL to create a data set with the GDG Base names used in commands as input for another utility:  
  

//*-------------------------------------------------------------------
//STEP02  EXEC PGM=IDCAMS                  LISTCAT GENERATIONDATAGROUP
//SYSPRINT  DD DSN=your.prefix.LISTGDG.#1,
//             DISP=(NEW,CATLG),UNIT=SYSDA,
//             SPACE=(CYL,(5,5),RLSE),
//             DCB=(RECFM=VBA,LRECL=133,BLKSIZE=0)
//SYSOUT    DD SYSOUT=*
//SYSABOUT  DD SYSOUT=*
//SYSDBOUT  DD SYSOUT=*
//SYSUDUMP  DD SYSOUT=*
//SYSIN     DD *
  LISTCAT LEVEL(hlq) GENERATIONDATAGROUP
//*-------------------------------------------------------------------
//STEP03  EXEC PGM=IEBGENER       CONVERT IDCAMS OUTPUT TO FB LRECL=80
//SYSPRINT  DD SYSOUT=*
//SYSUT1    DD DISP=SHR,DSN=your.prefix.LISTGDG.#1  <== HAS VBA 133
//SYSUT2    DD DSN=your.prefix.LISTGDG.#2,       <== CONVERT TO FB 80
//             DISP=(NEW,CATLG),UNIT=SYSDA,
//             SPACE=(CYL,(5,5),RLSE),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=4000)
//SYSIN DD *
  GENERATE MAXFLDS=1
  RECORD FIELD=(80,2,,1)
//*-------------------------------------------------------------------
//STEP04  EXEC PGM=SORT,REGION=5M       SELECT LINES AND REPLACE X'00'
//SYSOUT    DD SYSOUT=*
//SORTIN    DD DISP=SHR,DSN=your.prefix.LISTGDG.#2
//SORTOUT   DD DSN=your.prefix.LISTGDG.#3,    <== ALL GDG BASE NAMES
//             DISP=(NEW,CATLG),UNIT=SYSDA,
//             SPACE=(CYL,(5,5),RLSE)
//SYSIN     DD *
  SORT FIELDS=(17,44,CH,A)
  INCLUDE COND=(01,8,CH,EQ,C'GDG BASE')
  OUTREC FINDREP=(IN=(X'00'),OUT=(X'40'))
//*-------------------------------------------------------------------
//STEP05  EXEC PGM=SORT,REGION=5M        USE DS NAME AND BUILD COMMAND
//SYSOUT    DD SYSOUT=*
//SORTIN    DD DISP=SHR,DSN=your.prefix.LISTGDG.#3
//SORTOUT   DD DSN=your.prefix.LISTGDG.#4,   <== GENERATED LISTD COMMANDS
//             DISP=(NEW,CATLG),UNIT=SYSDA,
//             SPACE=(CYL,(5,5),RLSE)
//SYSIN     DD *
  SORT FIELDS=COPY
  OUTREC FIELDS=(C'  LISTD DUP,DSN=',17,44,80:X)
//*-------------------------------------------------------------------