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

JCL question


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

New User


Joined: 27 Apr 2009
Posts: 23
Location: mumbai

PostPosted: Sat Apr 25, 2015 7:31 pm
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Apr 25, 2015 7:34 pm
Reply with quote

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

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sun Apr 26, 2015 5:13 pm
Reply with quote

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

New User


Joined: 27 Apr 2009
Posts: 23
Location: mumbai

PostPosted: Mon Apr 27, 2015 9:09 am
Reply with quote

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

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Apr 27, 2015 1:41 pm
Reply with quote

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

New User


Joined: 27 Apr 2009
Posts: 23
Location: mumbai

PostPosted: Mon Apr 27, 2015 1:54 pm
Reply with quote

Thank you.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Apr 27, 2015 3:01 pm
Reply with quote

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

New User


Joined: 27 Apr 2009
Posts: 23
Location: mumbai

PostPosted: Tue Apr 28, 2015 2:20 pm
Reply with quote

Bill how can we use include to handle this situation.Is include means sort card.Could you please explain include method.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Apr 28, 2015 3:28 pm
Reply with quote

Read your JCL manual for INCLUDE.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Apr 28, 2015 3:29 pm
Reply with quote

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

New User


Joined: 27 Apr 2009
Posts: 23
Location: mumbai

PostPosted: Tue Apr 28, 2015 4:19 pm
Reply with quote

Thank you.Will check the JCL manual.
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 Question for file manager IBM Tools 7
No new posts question for Pedro TSO/ISPF 2
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts panel creation question TSO/ISPF 12
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
Search our Forums:

Back to Top