Tags

, , , , , ,

You might face an issue where the TAPE data set is deleted, but the VOLUME SERIAL allocated to that data set still showing the same data set in any of the TAPE utilities you have (Like TMS – TAPE MANAGEMENT SYSTEM). Now you know the TAPE data set is having the same Data set that got deleted (And you are not able to find in 3.4).In this scenario, you can make use of below JCL to recover the dataset to a different data set.

Deleted TAPE DSN: HLQ1.HLQ2.DELTED.TAPE

Recovered TAPE DSN: HLQ1.HLQ2.COPIED.TAPE

JCL:
//STEP01  EXEC PGM=SORT
//SORTIN   DD DSN=HLQ1.HLQ2.DELTED.TAPE,DISP=OLD,
//            UNIT=TAPE,VOL=SER=123456
//SORTOUT  DD DSN=HLQ1.HLQ2.COPIED.TAPE,
//            DISP=(,CATLG,CATLG),UNIT=TAPE,
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSOUT   DD SYSOUT=*
//SYSIN    DD *
  SORT FIELDS=COPY

Important SQL CODES and ABEND CODES
SORT JOIN – TO JOIN TWO FILES BASED ON A KEY
KNOW YOUR MAINFRAME
REXX – INITIAL SETUP
IDCAMS – Define VSAM ESDS
IDCAMS – Define VSAM RRDS
IDCAMS – Define VSAM KSDS
IDCAMS – Define Alternate Index (AIX)
IDCAMS – Define PATH for Alternate Index
IDCAMS – Define GDG
IDCAMS – Alter GDG, VSAM or PS File
IDCAMS – Delete GDG, VSAM or PS File
IDCAMS – Print VSAM File
IDCAMS
Recovery of Deleted Tape data set (Using Volume Serial)
JCL – SYSIN CONCATENATION
JCL – RUN ONLY ONE MIDDLE STEP (RESTART)
GDG – Delete Just Versions Not BASE
JCL – COPY DCB OF INPUT FILE TO OUTPUT FILE
HOW TO SUBMIT A JOB AUTOMATICALLY AFTER A JOB FINISHES
DELETE ALL GDG VERSIONS WITHOUT DELETING BASE
LISTCAT – BATCH JOB
IEBCOPY Examples
IEBGENER – INTERNAL READER TO SUBMIT
Delete Multiple datasets with same HLQ
JCL INTERVIEW QUESTIONS
JCL TIPS
Advertisements