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
 

 

Override system date In JCL

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

New User


Joined: 06 Aug 2005
Posts: 5

PostPosted: Wed Sep 12, 2007 3:14 pm    Post subject: Override system date In JCL
Reply with quote

Is there any parameter in JCL which can used to override system date in the program running in particular step?
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Sep 12, 2007 3:20 pm    Post subject:
Reply with quote

Rahul,

Your post is not clear. Post some more info about your requirment.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Wed Sep 12, 2007 4:24 pm    Post subject: Re: Override date In JCL
Reply with quote

rahul.nilekar wrote:
Is there any parameter in JCL which can used to override system date in the program running in particular step?
Hi,

Overrides are meant for DD statements.

It's not clear from your post, where do you want to override the date & how? If you show some example, hopefully, some one would be able to answer.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Sep 12, 2007 4:54 pm    Post subject: Reply to: Override date In JCL
Reply with quote

No, there is not.
Back to top
View user's profile Send private message
rahul.nilekar

New User


Joined: 06 Aug 2005
Posts: 5

PostPosted: Wed Sep 12, 2007 5:06 pm    Post subject:
Reply with quote

Hi,
Please find more info about the problem.
Example:
I am accepting system date in a cobol program like ACCEPT WS-DATE FROM DATE. Now whenever you accept date like this it will return CURRENT SYSTEM DATE into the variable WS-DATE.
But here in this case I want override this SYSTEM DATE with whatever date I will provide thru JCL. So basically the statement ACCEPT WS-DATE FROM DATE should return a date which I have supplied thru JCL.

I hope the problem is a little clear now.

Thanks
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Wed Sep 12, 2007 5:43 pm    Post subject:
Reply with quote

Hi rahul.nilekar !

So why not execute the programm with a parm in the JCL where you type that special date.

//SYSTSIN DD *
PROFILE
DSN SYSTEM(DB2T)
RUN PROGRAM(MDL80000) PLAN(GK210307)-
PARM('24.09.1957')
END

Then in your Programm check parm and move this date to your desired field WS-DATE.

Regards, UmeySan
Back to top
View user's profile Send private message
rahul.nilekar

New User


Joined: 06 Aug 2005
Posts: 5

PostPosted: Thu Sep 13, 2007 10:53 am    Post subject:
Reply with quote

hi,
These are not new programs. These are the existing ones. I just need to test them with different date other than the current date.
Thanks
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu Sep 13, 2007 11:28 am    Post subject:
Reply with quote

You can change your COBOL program like
Quote:
ACCEPT WS-DATE
, and then in JCL use SYSIN dd name for the program and pass date.
Back to top
View user's profile Send private message
rahul.nilekar

New User


Joined: 06 Aug 2005
Posts: 5

PostPosted: Thu Sep 13, 2007 11:42 am    Post subject:
Reply with quote

Hi ,
I need to get it done without changing the cobol programs.
Thanks
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Sep 13, 2007 12:09 pm    Post subject:
Reply with quote

rahul,

Quote:
I need to get it done without changing the cobol programs.

Not possible. Either you need to change the program or system date itself (which is not posisble).
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu Sep 13, 2007 12:11 pm    Post subject:
Reply with quote

If you dont want to change your code and do this kind of testing,
then you may have to look for some tools.

I remember there were lot of tools available for this kind of date simulation testing during Y2k changes, like Hourglass 2000 .

Check if any available in your site?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Sep 13, 2007 12:46 pm    Post subject:
Reply with quote

Devzee,

Quote:
I remember there were lot of tools available for this kind of date simulation testing during Y2k changes, like Hourglass 2000 .

Hour glass effects other programs also running in the region. Need to consider the side effects also.
Back to top
View user's profile Send private message
rahul.nilekar

New User


Joined: 06 Aug 2005
Posts: 5

PostPosted: Fri Sep 14, 2007 12:59 pm    Post subject:
Reply with quote

Thank you all... Hourglass is there at our site
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Sat Sep 15, 2007 9:11 am    Post subject:
Reply with quote

Quote:
Hourglass is there at our site

Go ahead and use it.
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 IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
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
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm


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