Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to delete all or part of the contents of a PS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to delete all or part of the contents of a PS
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: 2150
Location: At my coffee table

PostPosted: Sat Aug 18, 2007 9:54 pm    Post subject:
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    Post subject: Reply to: How to delete the conents of a PS
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: 3158
Location: Tucson AZ

PostPosted: Sat Aug 18, 2007 10:21 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Sun Aug 19, 2007 12:56 am    Post subject:
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 Moderator


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

PostPosted: Sun Aug 19, 2007 8:56 pm    Post subject:
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    Post subject: Reply to: How to delete all or part of the contents of a PS
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Prblem with mail having MIME contents harsh.saxena579 JCL & VSAM 2 Tue Dec 12, 2017 3:48 pm
No new posts Copying part of the report using SARBCH Aedulla CA Products 1 Tue Oct 24, 2017 9:24 am
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Delete IMS remote transaction when MO... Sam Singh IMS DB/DC 0 Wed Aug 23, 2017 9:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us