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
 

 

JCL question

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

New User


Joined: 27 Apr 2009
Posts: 22
Location: mumbai

PostPosted: Sat Apr 25, 2015 7:31 pm    Post subject: JCL question
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: 7914
Location: Bellevue, IA

PostPosted: Sat Apr 25, 2015 7:34 pm    Post subject:
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

Senior Member


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

PostPosted: Sun Apr 26, 2015 5:13 pm    Post subject:
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: 22
Location: mumbai

PostPosted: Mon Apr 27, 2015 9:09 am    Post subject: Reply to: JCL question
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

Senior Member


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

PostPosted: Mon Apr 27, 2015 1:41 pm    Post subject:
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: 22
Location: mumbai

PostPosted: Mon Apr 27, 2015 1:54 pm    Post subject: Reply to: JCL question
Reply with quote

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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Mon Apr 27, 2015 3:01 pm    Post subject: Reply to: JCL question
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: 22
Location: mumbai

PostPosted: Tue Apr 28, 2015 2:20 pm    Post subject: Reply to: JCL question
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: 1717
Location: UK

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

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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Apr 28, 2015 3:29 pm    Post subject: Reply to: JCL question
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: 22
Location: mumbai

PostPosted: Tue Apr 28, 2015 4:19 pm    Post subject:
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    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 Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts SQL Order By related question Joseph K Thomas DB2 8 Fri Mar 18, 2016 12:53 pm
No new posts DFSort Question krrp DFSORT/ICETOOL 9 Mon Mar 07, 2016 7:11 pm
No new posts Question: REORG on LOB tablespaces rakesh1155 DB2 1 Fri Aug 14, 2015 2:14 pm


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