View previous topic :: View next topic
|
Author |
Message |
PrabakarV
New User
Joined: 21 Dec 2007 Posts: 88 Location: My Desk
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Have you not considered using the scheduling software to schedule the required job/action at 22:01 ? |
|
Back to top |
|
|
PrabakarV
New User
Joined: 21 Dec 2007 Posts: 88 Location: My Desk
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
PrabakarV
New User
Joined: 21 Dec 2007 Posts: 88 Location: My Desk
|
|
|
|
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... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Prabakar,
Quote: |
if it is possible whether jcl has such option. |
you have learned nothing! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
Quote: |
you have learned nothing! |
amazing, not bolded, and font size normal |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Bill,
Surely could be
My "fear" was that there was an initiator blocked until 10pm. . .
d |
|
Back to top |
|
|
|