View previous topic :: View next topic
|
Author |
Message |
HameedAli
Active User
Joined: 16 Apr 2009 Posts: 151 Location: India
|
|
|
|
Hi!
Is it possible to delete/erase the contents of a data set or PDS using JCL without actually deleting the data set.?
For e.g.,
Say a data set 'qwerty.asdfg.zxcv' contains
*****Top of the Data*****
11111
22222
33333
***Bottom of the Data****
Is it possible to delete
11111
22222
33333
so that the data set looks like
*****Top of the Data*****
***Bottom of the Data**** |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
There are many ways - you may use something like this:
Code: |
//JS00100 EXEC PGM=IDCAMS
//DDDMMY DD DUMMY
//DDOUT DD DSN=...input file
// DISP=SHR
//SYSIN DD *
REPRO IFILE(DDDMMY) OFILE(DDOUT)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//* |
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Please take the back-up of input file first - not sure how important data do you have in that; or run a test on some test data if satisfied do whatever you want with your file. |
|
Back to top |
|
|
HameedAli
Active User
Joined: 16 Apr 2009 Posts: 151 Location: India
|
|
|
|
Anuj, it worked.
Thanks for the reply. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hopefully, I was helpful . . .
Ad |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
HameedAli
Active User
Joined: 16 Apr 2009 Posts: 151 Location: India
|
|
|
|
Thanks Superk, for the information |
|
Back to top |
|
|
|