View previous topic :: View next topic
|
Author |
Message |
Sysaron
New User
Joined: 28 Sep 2005 Posts: 55 Location: USA
|
|
|
|
Is it possible to selective execute a step in a job based on say ?time of year? or a user generated parameter?
For example, job A currently has 10 steps. 4 times in the year, this is good. For the 5th time (Fiscal year end), we need to execute 1 additional step to uncatalog a file created that we do not want to take into the new year. I would prefer not having another job that only has a step to uncatalog the file.
Thank you for your advice,
SRF |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Is this a DFSORT question?
I'll move it to the JCL forum - if it is a sort question, i can move it back.
You can do what you want by accepting the parameter in an early step and setting a "fiscal year run" condition code. The last step to do the uncatalog would only execute when the condition code was set. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Is this file on DASD or tape.
What happens to the uncatalogued data if on DASD.
Why not just delete it. |
|
Back to top |
|
|
gaylesmith
New User
Joined: 25 May 2007 Posts: 5 Location: los angeles, CA
|
|
|
|
If the dsn was always to be uncatlg'd, that would work.
But, 4 times during the Fiscal year, the file is needed to be catlg.
And for 1 run it doesn't.
We use the same PROC in the JOB for all 5 runs. Did not want to create a separate job for the 1 run. But, it is an option.
So, the inquiry was to determine if there are other suggestions.
And, during our Fiscal Year end processing, there is limited time in which to manually uncatlg the file prior to the job that would call in all gens of that file.
Thank-you. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If the file is no longer needed after the fiscal year end run, it would be a good thing to delete it rather than uncatalog it.
I believe you can do what you need in one job with the conditional step at the end to eliminate the file after the "5th" run.
If there are additional considerations, please let us know. |
|
Back to top |
|
|
gaylesmith
New User
Joined: 25 May 2007 Posts: 5 Location: los angeles, CA
|
|
|
|
How do you code the jcl for the conditional step?
I agree, deleting will be better...
Are you referring to executing a utility such as IEFBR14 to delete that gen?
and if so, conditional on what?
Can I make a utility step to be conditional on a user supplied parameter from a dataset for the 5th run?
I know how to make a step conditional based on a return code from a previous step. But, the cobol program that creates the file does not set any return codes. And we preferred not to modify the cobol program as time is limited for testing.
I can write a cobol program to do this, but I was hoping for a way to use a utility.
Thank-you all for your suggestions. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You can use your schedule software to set certain parameters, to use different JCL for a specific run of a job, to include / exclude certain steps depending on the schedule id / run frequency etc. etc.
Why not take a look at those options instead.
You could use DFdss to backup and delete the required file.
There are a lot of options available to you, you need to analyse what thay are and choose the one best suited to your needs. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
And .......... I forgot to add. If the dataset in question is tape based ,yes, just uncatalogue it. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you want to use condition code testing, either an existing program needs to be modified to process a parm and set the desired return code or a new really little program needs to be added to process the parm and set the return code.
Depending on what scheduling software your site uses, you might also do as expat suggested and have the system include the uncatalog/delete step when the fiscal year end run is processed. This would require no new program or modification to anything already in use.
You might want to talk with your scheduling people and see if there is a preference.
Please let us know if there are additonal questions. |
|
Back to top |
|
|
|