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

Deleting huge PS files at one using JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Tue Jul 03, 2012 11:08 pm
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
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: 123
Location: Hyderabad

PostPosted: Wed Jul 04, 2012 12:49 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top