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

How to delete all or part of the contents of a PS


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ziddiguy

New User


Joined: 20 Jul 2007
Posts: 14
Location: Germany

PostPosted: Sat Aug 18, 2007 9:33 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Aug 18, 2007 9:54 pm
Reply with quote

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
View user's profile Send private message
ziddiguy

New User


Joined: 20 Jul 2007
Posts: 14
Location: Germany

PostPosted: Sat Aug 18, 2007 9:59 pm
Reply with quote

Appreciate your prompt reply.. But for the second question that if I want to purge only first 1000 records
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sat Aug 18, 2007 10:21 pm
Reply with 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.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Aug 19, 2007 12:56 am
Reply with quote

For your first question, you can also try IDCAMS REPRO with COUNT(0).

O.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sun Aug 19, 2007 8:56 pm
Reply with quote

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
View user's profile Send private message
ziddiguy

New User


Joined: 20 Jul 2007
Posts: 14
Location: Germany

PostPosted: Mon Aug 20, 2007 2:38 am
Reply with quote

Thanks Guys

Appreciate your help!!!!!
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Delete file row if blanks in the firs... DFSORT/ICETOOL 5
No new posts volume mass delete RMM JCL & VSAM 2
Search our Forums:

Back to Top