View previous topic :: View next topic
|
Author |
Message |
senthamizh
New User
Joined: 27 Apr 2009 Posts: 23 Location: mumbai
|
|
|
|
Hi All,
I have a question regarding set parameter in JCl.
currently in our Job the current date and current date -1 is calculated by driver PROC and the dates are set in the beginig of the job when it gets executed,
SET Cdate1=15115
set cdate2= 15114
now is it possible to validated and change this cdate in the beginning of the job,i.e in the first step?
Thanks,
chez |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
JCL, once submitted into the system and run through the converter, CANNOT be changed -- PERIOD. Hence you cannot make any changes to CDATE2 in that job. You could create and submit another job with your changed CDATE2, but the original job where CDATE2 is set cannot be changed after it is submitted. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
The way you show them they look like "hard-coded" values in the JCL. If something needs to be validated why do you hard code it as a constant value? And what validation do you want to do? |
|
Back to top |
|
|
senthamizh
New User
Joined: 27 Apr 2009 Posts: 23 Location: mumbai
|
|
|
|
Thanks for the response. The cdate are not hard coded,it is generated by a driver module in the JCL(they call it as DPROC).We want the JCl to pick schedule date.Below is the current scenario.
1) The job is schedule in CA7 daily.
2) For eg : if the job is schedule 4/27/2015 and if the job runs before midnight 12:00 it takes current date as Cdate,and sets cdate = current date in julian formate.i.e cdate = 15117,SET cdate =15117 is passed in the jcl.The julian date is used as symbolic parameter in the file,the file will be created as xyz.abc.D15117.
3) If suppose the job runs after midnight 12:00 (due to delay in batch cycle or delay in triggering of this job) i,e if it runs on 4/28/2015 ,then it takes 4/28/2015 as current date and set cdate = current date in julian formate(Cdate=15118),as per the system it is correct it will take current date that is 15118,but according to our requirement it is incorrect.In this case we want the cdate to be set as 15117 even though it is running on 15118(4/28/2015).
Is there any way to fix this.Currently we have a idea to write a COBOL program to check the dates and generate JCL.
But we want to check is there some other way to fix this problem.
Is it possible to take schedule date from CA7,or is there any redymade driver module available in CA7 so that we can use that in JCL to pick Schedule date.
Thanks,
Chez |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
That sounds like a 'business problem' rather than a 'technical problem'. At one shop, to mitigate such a situation, we used "Business Run Date" for that very purpose rather than 'system date'. For batch runs there is usually a 'business run date' -- ask at your shop to identify such a 'business date' which can be used for this job...possibly. |
|
Back to top |
|
|
senthamizh
New User
Joined: 27 Apr 2009 Posts: 23 Location: mumbai
|
|
|
|
Thank you. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If this is for dataset names (or similar) then your Scheduler should be able to provide the information.
How those get set in the Scheduler, you talk to your Scheduler group.
The driver for how those are set should be your "Business Date/Data Date" file.
How you implement that in your JCL is partly down to whether you have use of the Scheduler in your environments beyond development testing. If you do, there are many ways to do it. If you don't, an INCLUDE is a simple way to have one place to make the change. |
|
Back to top |
|
|
senthamizh
New User
Joined: 27 Apr 2009 Posts: 23 Location: mumbai
|
|
|
|
Bill how can we use include to handle this situation.Is include means sort card.Could you please explain include method. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Read your JCL manual for INCLUDE. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Bearing in mind that SORT is not JCL, look at INCLUDE in the JCL Reference.
Means you can set up a member with your SET symbols in, and then cause that member to use used in multiple places. |
|
Back to top |
|
|
senthamizh
New User
Joined: 27 Apr 2009 Posts: 23 Location: mumbai
|
|
|
|
Thank you.Will check the JCL manual. |
|
Back to top |
|
|
|