View previous topic :: View next topic
|
Author |
Message |
pattabhiram_c
New User
Joined: 17 Apr 2007 Posts: 3 Location: Hyderabad
|
|
|
|
Is is there any way emptying the last generation of GDG using REXX code? |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
pattabhiram_c
New User
Joined: 17 Apr 2007 Posts: 3 Location: Hyderabad
|
|
|
|
Need to delete the records in the version which is created first |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
"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 |
|
|
|