• Rajesh A R

F1 for Mainframe

F1 for Mainframe

Monthly Archives: September 2013

GDG – Delete Just Versions Not BASE

17 Tuesday Sep 2013

Posted by rajeshar in JCL

≈ Leave a comment

Tags

gdg, JCL

GDG – Delete Just Versions Not BASE

There is a GDG file with 3 versions. Requirement is to just delete the versions and not the BASE. Which of the below can be used.

A) //PGM EXEC PGM=IDCAMS

//SYSPRINT DD SYSOUT=*

//SYSIN DD *

DELETE (YOUR.INPUT.GDG) GDG

B) //PGM EXEC PGM=IDCAMS

//SYSPRINT DD SYSOUT=*

//SYSIN DD *

DELETE (YOUR.INPUT.GDG) GDG FORCE

C) //PGM EXEC PGM=IEFBR14

//YOURGDG DD DSN=YOUR.INPUT.GDG,

// DISP=(OLD,DELETE,DELETE)

D) TSO DEL ‘YOUR.INPUT.GDG’

A. C

Please note that without FORCE command as used in OPTION B, we cannot delete a GDG BASE when you have some versions for it.

So we can not directly delete the GDG base when you have versions on it as in our case.

Let us see below about all the options.

A) Job will give a return code of “08” – because the job tries to delete the GDG and not the versions.

B) Job will delete the BASE as well along with versions

C) Job will delete only the versions

D) This TSO function as well will give an error message, because it also tries to delete the GDG and not the versions.

——————————————————————————————————–

In United States, If you would like to Earn Free Stocks, Credit card Points and Bank account Bonuses, Please visit My Finance Blog

——————————————————————————————————–

You may also like to look at:

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

Rate this:

← Older posts
Newer posts →

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • November 2020
  • July 2020
  • February 2020
  • January 2020
  • September 2019
  • August 2019
  • October 2018
  • April 2018
  • March 2018
  • December 2017
  • October 2017
  • August 2017
  • July 2017
  • June 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • May 2016
  • March 2016
  • February 2016
  • January 2016
  • May 2015
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • January 2013
  • December 2012
  • November 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • April 2011
  • March 2011
  • August 2009
  • June 2009
  • April 2009

Categories

  • Azure
  • CA7
  • CICS
  • COBOL
    • Keywords
  • DB2
  • EASYTRIEVE
  • FILEAID
  • FILEMAXX
  • IMS
  • ISPF
  • JCL
  • KNOW YOUR MAINFRAME
  • Mainframe Migration
  • MAINFRAMES
  • Others
  • REXX
  • SDSF
  • SORT
  • Training
  • TSQL
  • VSAM

Meta

  • Create account
  • Log in

Blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • F1 for Mainframe
    • Join 90 other subscribers
    • Already have a WordPress.com account? Log in now.
    • F1 for Mainframe
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar