bhaskar_kanteti
Active User
Joined: 01 Feb 2007 Posts: 123 Location: Hyderabad
|
|
|
|
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 |
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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
|
|
|