IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Emptying the Last generation of GDG


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pattabhiram_c

New User


Joined: 17 Apr 2007
Posts: 3
Location: Hyderabad

PostPosted: Fri Jun 01, 2007 11:03 am
Reply with quote

Is is there any way emptying the last generation of GDG using REXX code?
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Fri Jun 01, 2007 11:59 am
Reply with quote

What do you mean by last version? latest version?
What do you mean by emptying? deleting all records? or Deleting dataset itself?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jun 01, 2007 12:53 pm
Reply with quote

If you mean that the 0 gen is a null file, then just define a +1 gen with IEBGENER, using SYSUT1 DD DUMMY.

Then after the job finishes the current 0 version will be empty.
Back to top
View user's profile Send private message
pattabhiram_c

New User


Joined: 17 Apr 2007
Posts: 3
Location: Hyderabad

PostPosted: Fri Jun 01, 2007 1:42 pm
Reply with quote

Need to delete the records in the version which is created first
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Jun 01, 2007 2:34 pm
Reply with quote

"EXECIO 0 DISKW ddname (FINIS"

ought to do what you want in REXX code.

My preference is to use DFSORT with SORTIN and SORTOUT using the same dataset with two control statements:

Code:

  OPTION COPY
  OMIT COND=ALL
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts DFHPI1008 JSON generation failed COBOL Programming 0
No new posts Started task using a generation dataset JCL & VSAM 7
No new posts Report generation JCL & VSAM 18
No new posts How can I get Generation Nbr of GDG f... IBM Tools 1
No new posts Sequence number generation for multip... DFSORT/ICETOOL 2
Search our Forums:

Back to Top