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: 120
Location: USA

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: 120
Location: USA

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 Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm


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