Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 7232

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: 1715
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: 1529
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: 7913
Location: Bellevue, IA

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: 1529
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: 1610
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: 10202
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: 175
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: 1738
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
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to get previous month in SYMNAMES Suganya87 SYNCSORT 9 Fri Oct 28, 2016 1:37 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
This topic is locked: you cannot edit posts or make replies. Job to wait and continue based on reply yugendran COBOL Programming 5 Wed Oct 05, 2016 1:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us