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

how to find current time thru jcl


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

New User


Joined: 21 Dec 2007
Posts: 88
Location: My Desk

PostPosted: Wed Oct 21, 2009 2:59 pm
Reply with quote

Need to find the current time and send a mail if its crossed 10:00PM.

Currently we have a simple COBOL program, which will check the time and set an abnormal RC, based on the RC the mail step will be executed. Now we have planned to remove this COBOL program and do the check in JCL itself E.x, using SORT CARD etc.,

Can anyone know how to find the current time and set a RC if the time crossed 10:00PM in SORT card or anyother way.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 21, 2009 3:05 pm
Reply with quote

Have you not considered using the scheduling software to schedule the required job/action at 22:01 ?
Back to top
View user's profile Send private message
PrabakarV

New User


Joined: 21 Dec 2007
Posts: 88
Location: My Desk

PostPosted: Wed Oct 21, 2009 3:10 pm
Reply with quote

i believe that can be done... but i am curious about getting current date or time thru jcl... is that possible Expat? guidance appreciated.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 21, 2009 3:24 pm
Reply with quote

Well, JCL by itself does absolutely nothing except convey to the CPU which program needs to be executed, and which files to use for the processing. So by using JCL alone, the answer is a big fat NO

So why do you want to waste valuable resource by running something that constantly checks to see what time it is and only at a certain time do something else.

The scheduling software is the easiest and cleanest way of doing this.
Back to top
View user's profile Send private message
PrabakarV

New User


Joined: 21 Dec 2007
Posts: 88
Location: My Desk

PostPosted: Wed Oct 21, 2009 3:39 pm
Reply with quote

Thank u very much Expat... i have searched the forums well & i came to a conclusion what u said above before u say... but i was curious that if anyone know if it is possible whether jcl has such option... icon_sad.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Oct 21, 2009 4:14 pm
Reply with quote

Prabakar,

Quote:
if it is possible whether jcl has such option.


you have learned nothing!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Oct 21, 2009 4:20 pm
Reply with quote

Quote:
you have learned nothing!


amazing, not bolded, and font size normal icon_wink.gif
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: Wed Oct 21, 2009 5:33 pm
Reply with quote

Quote:
but i was curious that if anyone know if it is possible whether jcl has such option
If you already know the answer is NO, did you think that asking again is going to change it?
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Wed Oct 21, 2009 7:10 pm
Reply with quote

Prabakar,

The responders are attempting to explain that JCL alone is not what performs any action. It takes a PROGRAM, defined using JCL statements, to read/write/print, etc.

As you hinted by mentioning SORT CARD, a utility program such as DFSORT may allow you to accomplish your goal. You will, however, still be executing a program with several logical steps and not simply using JCL. This is the concept you should learn.

Why replace a functioning COBOL program with a hodge-podge of utility program executions?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 21, 2009 9:27 pm
Reply with quote

Hello,

Possibly, i misunderstand something, but why is there a cobol program to set some return code at all?

Is there some reason that the e-mail is not simply scheduled to run at the proper time?

How many times is this process currently executed?
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Wed Oct 21, 2009 9:38 pm
Reply with quote

Dick,
My take on this was that a step in the executing job determines whether it's after 10pm and sets a RC to generate an email saying "I'm late!", or whatever.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 21, 2009 11:19 pm
Reply with quote

Hi Bill,

Surely could be icon_smile.gif

My "fear" was that there was an initiator blocked until 10pm. . .

d
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 To find whether record count are true... DFSORT/ICETOOL 6
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
No new posts Changeman - how can we know the curr... Compuware & Other Tools 2
Search our Forums:

Back to Top