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

Input Parameter to uncatalog dataset on specific run dates?


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

New User


Joined: 28 Sep 2005
Posts: 55
Location: USA

PostPosted: Fri May 25, 2007 2:57 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri May 25, 2007 3:04 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri May 25, 2007 11:24 am
Reply with quote

Is this file on DASD or tape.

What happens to the uncatalogued data if on DASD.

Why not just delete it.
Back to top
View user's profile Send private message
gaylesmith

New User


Joined: 25 May 2007
Posts: 5
Location: los angeles, CA

PostPosted: Fri May 25, 2007 10:42 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri May 25, 2007 11:45 pm
Reply with quote

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
View user's profile Send private message
gaylesmith

New User


Joined: 25 May 2007
Posts: 5
Location: los angeles, CA

PostPosted: Fri May 25, 2007 11:54 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat May 26, 2007 12:57 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat May 26, 2007 12:58 am
Reply with quote

And .......... I forgot to add. If the dataset in question is tape based ,yes, just uncatalogue it.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat May 26, 2007 1:23 am
Reply with quote

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
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 TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
Search our Forums:

Back to Top