View previous topic :: View next topic
|
Author |
Message |
ziddiguy
New User
Joined: 20 Jul 2007 Posts: 14 Location: Germany
|
|
|
|
Hi friends..
I have some more doubt that how can we delete(purge) the contents(data) in a PS.. Suppose I hava a PS with millions of record
1)I would like to delete all millions of records and make PS empty
2) How can I purge only first 1000 records
Appreciate your help
Thanks |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Point almost any utility at it and write no records, it will open and close it, creating an empty file. For instance:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
/*
//SORTOUT DD DSN=your dataset,DISP=OLD
//SYSIN DD *
OPTION COPY
/* |
|
|
Back to top |
|
|
ziddiguy
New User
Joined: 20 Jul 2007 Posts: 14 Location: Germany
|
|
|
|
Appreciate your prompt reply.. But for the second question that if I want to purge only first 1000 records |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
You can't directly, you will have to read the dataset and rewrite it. Sort has a command that allows you to skip records. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
For your first question, you can also try IDCAMS REPRO with COUNT(0).
O. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
You can't directly, you will have to read the dataset and rewrite it. Sort has a command that allows you to skip records. |
That would be:
Code: |
OPTION COPY,SKIPREC=1000
|
|
|
Back to top |
|
|
ziddiguy
New User
Joined: 20 Jul 2007 Posts: 14 Location: Germany
|
|
|
|
Thanks Guys
Appreciate your help!!!!! |
|
Back to top |
|
|
|