Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Bypass JCl Step based on what month it is

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
LouAnn Piela

New User


Joined: 29 Apr 2014
Posts: 3
Location: USA

PostPosted: Tue Apr 29, 2014 9:00 pm    Post subject: Bypass JCl Step based on what month it is
Reply with quote

I have a monthly job that will execute 2 steps. Step 1 is always executed. Step 2 will only be executed if it is month January, April, July or October. (The months will change each year). I need a way to execute Step 2 only during one of the exception months. I researched cond code processing and using the parm parameter but can't seem to come up with a solution. Any suggestions? If it helps, what I am trying to do is concatenate 4 or 5 weeks of GDGs into one flat file. For January I have 5 files, February I have 4 files ect. Step 1 was concatenating 4 files. Step 2 will append the 5 weeks file IF it is a file week month. Thanks for any help you can provide.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Apr 29, 2014 9:06 pm    Post subject: Reply to: Bypass JCl Step based on what month it is
Reply with quote

Why can't you use your Scheduler?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1894
Location: UK

PostPosted: Tue Apr 29, 2014 9:20 pm    Post subject: Reply to: Bypass JCl Step based on what month it is
Reply with quote

Or simply clear down your GDG once you have amalgamated the datasets so you will only ever be dealing with G0001V00 to G0004V00 or G0005V00?
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1542
Location: Andromeda Galaxy

PostPosted: Tue Apr 29, 2014 9:37 pm    Post subject:
Reply with quote

As Bill suggested this could be handled in scheduler and also contact your support team. They could guide you
Back to top
View user's profile Send private message
LouAnn Piela

New User


Joined: 29 Apr 2014
Posts: 3
Location: USA

PostPosted: Tue Apr 29, 2014 11:04 pm    Post subject: Bypass JCl Step based on what month it is
Reply with quote

Can't clear down the GDGs. They aren't my files to do that. I just use them. As for the scheduler doing it, can you elaborate? How is the scheduler going to control running the second step on certain months without that being a manual effort on their part?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Tue Apr 29, 2014 11:13 pm    Post subject:
Reply with quote

You need to work with your site support group. Schedulers such as CA-7 can identify the week of the month and execute different jobs (such as one with two steps versus one step) depending upon the number of weeks in the month. If set up correctly, WITH YOUR SITE SUPPORT GROUP'S ASSISTANCE, the entire process would be automated.

CA-7 even allows you, via the CA-DRIVER process, to perform calculations with dates -- it is quite flexible in that regard.
Back to top
View user's profile Send private message
LouAnn Piela

New User


Joined: 29 Apr 2014
Posts: 3
Location: USA

PostPosted: Tue Apr 29, 2014 11:29 pm    Post subject: Bypass JCl Step based on what month it is
Reply with quote

The two job idea - I had though of that but didn't want to create two separate jobs. That is a possibility and I know that can be set up on a schedule the way you noted above.The CA-7 option is one I need to look into. THANKS!
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1542
Location: Andromeda Galaxy

PostPosted: Tue Apr 29, 2014 11:31 pm    Post subject:
Reply with quote

What is the scheduler at your shop?
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1806
Location: NY,USA

PostPosted: Wed Apr 30, 2014 1:11 am    Post subject:
Reply with quote

Quote:
Step 2 will only be executed if it is month January, April, July or October. (The months will change each year).


How are you getting this now ? and what logic is in place?

Quote:
I need a way to execute Step 2 only during one of the exception months.

Can you please explain more on what do you mean by exception months?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Wed Apr 30, 2014 1:27 am    Post subject: Reply to: Bypass JCl Step based on what month it is
Reply with quote

the problem is that ...
Quote:
(The months will change each year).


so it might be possible to define a monthly cycle
but given the above no hope for a proper quarterly cycle
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 182
Location: UK

PostPosted: Wed Apr 30, 2014 11:53 am    Post subject:
Reply with quote

A simple Rexx could be included in the job which would set a return code based on the current month and therefore control the execution of the second step.

Obviously it will need amendment each year if the required months change, so not ideal but I believe it would meet the stated requirement.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1777
Location: Bloomington, IL

PostPosted: Wed Apr 30, 2014 4:39 pm    Post subject:
Reply with quote

David Robinson wrote:
A simple Rexx could be included in the job which would set a return code based on the current month and therefore control the execution of the second step.

Obviously it will need amendment each year if the required months change, so not ideal but I believe it would meet the stated requirement.

Rather than hard-code the exception months in the script, I'd suggest getting them from some external source (parameters, data set, ISPF or DB2 table, etc.) Changes will still be needed to that source, but the script can be more general and the external source can be used as a calendar.
Back to top
View user's profile Send private message
jaidev85

New User


Joined: 11 Nov 2013
Posts: 3
Location: Bangalore

PostPosted: Sat May 17, 2014 1:46 pm    Post subject: Bypass JCl Step based on what month it is
Reply with quote

Ya Correct!!

Rather than hard coding and amending the code every year, parameterizing the Months needed either from file or table would be great!!

1. First collect month names inscope from files or table
2. Check it using REXX or COBOl and set the return code.
3. Depending on return code handle the step 2.

Regards,
Jai[/quote]
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us