We installed new tape devices. How can we update our cataloged datasets to handle the new density?

Document ID : KB000049754
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

When newer tape devices are added which are not compatible with older devices you need to deal with the following two aspects :

  1. Change the density of all the datasets to the new density.

  2. Delete the old tapes which are now scratched and which will no longer be used. Deleting them will free space in the DYNAM catalog.

Solution:

Using DYNPRINT, you can easily generate the input cards for a // EXEC DYNCAT which will change the density of the datasets, or generate the DELETE statements for the tapes which are in SCRATCH status. We will show you here JCL and DYNPRINT statements to generate these commands.

// JOB DYNPRINT
// DLBL SORTIN1,'===SORTIN1'
// DLBL SORTWK1,'===SORTWK1'
// DLBL SORTOUT,'===SORTOUT'
// DLBL EARLOBJ,'===EARLOBJ'
// DLBL WORK1,'===WORK1'
// DLBL SYSPRIN,'===SYSPRIN'
/* DLBL SYSEARL,'===SYSERAL'
// DLBL IJSYS05,'===SYS005'
// DLBL IJSYS06,'===SYS006'
/* OPTION CATAL
// EXEC DYNPRINT,SIZE=800K
ACCESS CATALOG
COMPILE CUSTOM05,REQ=SD
/*
OPTION LIST OFF       ! SUPPRESS COMPILATION LISTING
OPTION PAGE=60        ! NO SUPPRESS PAGE BREAKE
OPTION PRINTER=132
! OPTION SAVE=CUS05
! USER 'EVRAZ INC '
OPTION EXCLUDE        ! NO SUPPRESS PAGE HEADING
! OPTION ERRLIM=5
! THIS REPORT IS A USER REPORT, NOT SUPPORTED BY CA
!----------------------------------------------------------------------
!
!          SAMPLE DYNPRINT CUSTOM REPORT
!
!----------------------------------------------------------------------
CAICATL: FILE DYNREAD 300 RECORD = 3234
DEFINE INFOREC 1-3234 X
DEFINE CATINFO (X 3234) = 'DYNINFO 7.1'
DEFINE YDPINFO (X 102) = 'DYNPARM'
COPY DYNINFOE USING INFOREC
COPY YDPARMSE USING YDPINFO
DEFINE PREF (X 5) = 'ALT '''  
DEFINE SUFF (X 10) = ''' DEN=08E ' ! CAN BE CHANGED TO ANOTHER DENSITY
DEFINE MF (X 6) = ' '
DEFINE DATASETN (X 44 ) = ' '
DEFINE QUOTE (X 1) = ''''
SET DYNRQLEN = DYNINFLN
GET CAICATL
GOTO EOJ DYNRTCOD > 28
GOTO EOJ DYNRTCOD = 20
IF DYNRTCOD = 16
    THEN SET DATASETN = 'PASSWORD PROTECTED DATASET'
    ELSE SET DATASETN = DYNDSN
ENDIF  
! CHECK FOR AMF DATASETS
IF DYNAUTOS > 0 THEN
    SET MF = 'MF=NEW'
ELSE
    SET MF = ' '
ENDIF  
GOTO START DYNDEVCL = 'DISK'
GOTO START DYNAUTOS = 255
REPORT EXCLUDE
PRINT @ 1 PREF
      @ 6 DATASETN
      @ 50 SUFF
      @ 61 MF
END 
/*     
/&

The output of this job will have the form

ALT 'datasetname' DEN=08E

The following DYNPRINT will generate the DELETE statement to delete all the tapes that are in scratch status and density 08E:

// JOB DYNPRINT
* DELETE ALL THE VOLUMES WITH DENSITY 08E AND STATUS SCRATCH
// DLBL SORTIN1,'===SORTIN1'
// DLBL SORTWK1,'===SORTWK1'
// DLBL SORTOUT,'===SORTOUT'
// DLBL EARLOBJ,'===EARLOBJ'
// DLBL WORK1,'===WORK1'
// DLBL SYSPRIN,'===SYSPRIN'
/* DLBL SYSEARL,'===SYSERAL'
// DLBL IJSYS05,'===SYS005'
// DLBL IJSYS06,'===SYS006'
// OPTION CATAL
// EXEC DYNPRINT,SIZE=800K
COMPILE CUSTOM05,REQ=SV
/*
OPTION LIST ON           ! SUPPRESS COMPILATION LISTING
OPTION PAGE=60           ! NO SUPPRESS PAGE BREAKE
OPTION PRINTER=132
! OPTION SAVE=CUS05
! OPTION EXCLUDE         ! NO SUPPRESS PAGE HEADING
! OPTION ERRLIM=5
! THIS REPORT IS A USER REPORT, NOT SUPPORTED BY CA
!----------------------------------------------------------------------!
!                                                                      !
!                 SAMPLE DYNPRINT CUSTOM REPORT                        !
!                                                                      !
!----------------------------------------------------------------------!
CAICATL: FILE DYNREAD 300 RECORD = 3234
DEFINE INFOREC 1-3234 X
DEFINE CATINFO (X 3234) = 'DYNINFO 7.1'
DEFINE YDPINFO (X 102) = 'DYNPARM'
COPY DYNINFOE USING INFOREC
COPY YDPARMSE USING YDPINFO
DEFINE DEL1 (X 8) = 'DEL VOL='
SET DYNRQLEN = DYNINFLN  
SET DYNRQCD = 'SV'
GET CAICATL
GOTO EOJ DYNRTCOD > 26        ! ERROR
GOTO EOJ DYNRTCOD = 24        ! END OF CATALOG
GOTO START DYVMODE2 NOT = '08E ' ! NOT 3490E
GOTO START DYNRTCOD NOT = 6      ! SCRATCH TAPE
REPORT EXCLUDE
SELECT DYGCDVCL NOT = 'DISK '
SELECT DYVVOL NOT = ' '
CONTROL DYVVOL
PRINT @ 1 DEL1
      @ 9 DYVVOL
END
* $$ LST CLASS=V,DEST=(*,DEVDA01)
/*      
/&

output generated:

DEL VOL=A00009
DEL VOL=DDV021
DEL VOL=DDV026
DEL VOL=DDV027

In the sample, there are 2 special characters that can have a different hexadecimal representation depending on the code page used:

! = x'5A'
@ = x'7C'