View previous topic :: View next topic |
Author |
Message |
yrcreddy Beginner
Joined: 28 Dec 2005 Posts: 27 Topics: 12
|
Posted: Thu May 24, 2007 11:15 pm Post subject: Adding a new step at the beginning of the jobs using REXX |
|
|
Hi,
We have 500 jobs in a Library.We need to add the delete step in the beginning of the every job for to delete all the datasets that are created in that specific job.
The following step is need to be added in the jobs:
//STEP01 EXEC PGM=IDCAMS
//*-----------------------
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
DEL DATA-SET NAME
SET MAXCC=0
/*
Please let me know,how to achieve the above scnario using REXX tool. _________________ Thanks,
Ramachandra Reddy |
|
Back to top |
|
|
expat Intermediate
Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Fri May 25, 2007 12:49 am Post subject: |
|
|
Code: |
//STEP01 EXEC PGM=IDCAMS
//*-----------------------
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
|
Putting the above code into a PDS member would a starting point. This can then be included into each member of your PDS using an EDIT MACRO, and placed before the first EXEC statement.
So how are you going to determine the datasets to be deleted in each seperate member ? _________________ If it's true that we are here to help others,
then what exactly are the others here for ? |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri May 25, 2007 1:36 am Post subject: |
|
|
you may also have to renumber the following steps.
Are there multiple steps in the job? For efficiency you should have a delete before EACH step. That delete step would be the restart point.
If you are doing it by Rexx and not a Rexx macro you would:
Use library services to access each member of your PDS one at a time
Read through the member until you found the point where your step is to be inserted
Insert the step
continue reading
at each step change the step number
create delete records for the dataset names being created
write out the delete member
at end - save _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12373 Topics: 75 Location: San Jose
|
Posted: Fri May 25, 2007 8:31 am Post subject: |
|
|
Quote: |
We have 500 jobs in a Library.We need to add the delete step in the beginning of the every job for to delete all the datasets that are created in that specific job.
|
Your schdelur package should have 1 to delete the dataset created. CA-11 is an add on utility for CA-7
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
expat Intermediate
Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Fri May 25, 2007 12:08 pm Post subject: |
|
|
I do in principle agree with Nic
( But I would do as he has invited me to his BBQ )
But the practicalities are a real PITA.
The code below is an ISPF edit macro, butchered from my new site JCL setup suite, that will insert a given member of a PDS before the first EXEC statement in a member of the same PDS - As I said above to use the basic IDCAMS JCL as an insert member.
All it needs now is for the OP to determine the logic for identifying the dataset names to be deleted, and off we go ...............
Code: |
/* REXX *** BUILD JCL LIBRARY TO NEW SITE CONFIGURATION */
ADDRESS TSO
"ISREDIT MACRO"
"ISREDIT F 'EXEC' FIRST"
IF RC <> 0 THEN EXIT
"ISREDIT (CRSLINE,CRSCOL) = CURSOR"
"ISREDIT COPY xxxxxx BEFORE "CRSLINE
"ISREDIT END"
|
So over to Dick for his PDF |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri May 25, 2007 12:16 pm Post subject: |
|
|
Thanks for the invite expat, but I would not ever need it; I only work at sites that have enough budget for a decent scheduler. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
expat Intermediate
Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Fri May 25, 2007 2:30 pm Post subject: |
|
|
Dick, exactly my point. You could use it to insert the CA-11 steps at the start of each job _________________ If it's true that we are here to help others,
then what exactly are the others here for ? |
|
Back to top |
|
|
|
|