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
 
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 FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

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