Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Deleting huge PS files at one using JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 113
Location: India

PostPosted: Tue Jul 03, 2012 11:08 pm    Post subject: Deleting huge PS files at one using JCL
Reply with quote

Hi,

Could some one help me for below requirement.

I need a job such that it will have a file as input and this input file will have 100s of PS file names as records in it.

My job should take this file as input and delete all those 100s of PS files which are in it. So that I can update this input file everytime I run the job without actually disturbing the job.

Please suggest.

Thanks,
Bhaskar
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Jul 03, 2012 11:24 pm    Post subject: Reply to: Deleting huge PS files at one using JCL
Reply with quote

bhaskar_kanteti,

Assuming that your input file has the file names to deleted in pos 1 , the following the DFSORT JCL will build the DELETE cards which will be used as input for IDCAMS in the next step.

Code:

//STEP0100 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD *                                               
----+----1----+----2----+----3----+----4----+----5----+----6---
A.B.C.D.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W                   
A.B.C.D.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V                     
A.B.C.D.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U                       
A.B.C.D.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T                         
A.B.C.D.F.G.H.I.J.K.L.M.N.O.P.Q.R.S                           
A.B.C.D.F.G.H.I.J.K.L.M.N.O.P.Q.R                             
A.B.C.D.F.G.H.I.J.K.L.M.N.O.P.Q                               
A.B.C.D.F.G.H.I.J.K.L.M.N.O.P                                 
A.B.C.D.F.G.H.I.J.K.L.M.N.O                                   
//SORTOUT  DD DSN=&&DEL,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)   
//SYSIN    DD *                                               
  SORT FIELDS=COPY                                             
  INREC BUILD=(3:1,44,SQZ=(SHIFT=LEFT,                         
                 TRAIL=C'''',LEAD=C'DELETE ''',LENGTH=78))     
//*                                                           
//STEP0200 EXEC PGM=IDCAMS                                     
//SYSPRINT DD SYSOUT=*                                         
//SYSIN    DD DSN=&&DEL,DISP=SHR                               
Back to top
View user's profile Send private message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 113
Location: India

PostPosted: Wed Jul 04, 2012 12:49 am    Post subject: Reply to: Deleting huge PS files at one using JCL
Reply with quote

It worked. Thank you so much Skolusu.

- Bhaskar
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us