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
 

 

how to find current time thru jcl

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: how to find current time thru jcl
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: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 21, 2009 3:05 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 21, 2009 3:24 pm    Post subject:
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Oct 21, 2009 4:20 pm    Post subject: Reply to: how to find current time thru jcl
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: 7936
Location: Bellevue, IA

PostPosted: Wed Oct 21, 2009 5:33 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Oct 21, 2009 9:27 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Oct 21, 2009 11:19 pm    Post subject: Reply to: how to find current time thru jcl
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    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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 3 Thu Jan 19, 2017 1:31 am
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm


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