Job Start Time



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Job Start Time

Postby tpattison » Tue Oct 05, 2010 11:01 pm

Is there any way for a z/OS COBOL program to acquire it's Job Start Time? In iSeries programs, I believe TIME will provide this, but I haven't seen anything comparable for z/OS
tpattison
 
Posts: 4
Joined: Tue Oct 05, 2010 10:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Job Start Time

 

Re: Job Start Time

Postby dick scherrer » Wed Oct 06, 2010 12:04 am

Hello and welcome to the forum,

I'm not aware of any built-in COBOL function to retrieve job start time.

If the program is step 15 of a job, is the "beginning of job" time wanted or would when the code began executing be sufficient?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 92 times

Re: Job Start Time

Postby tpattison » Wed Oct 06, 2010 12:09 am

I believe what my Designer is after is the start time of the COBOL program itself, as opposed to a Jobstream which contains it as a step
tpattison
 
Posts: 4
Joined: Tue Oct 05, 2010 10:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Job Start Time

Postby steve-myers » Wed Oct 06, 2010 12:51 am

tpattison wrote:I believe what my Designer is after is the start time of the COBOL program itself, as opposed to a Jobstream which contains it as a step
I'm sure there are functions in Cobol that will give you the current date and time. Just execute them as soon as possible after your program starts and save the result and you'll have it. I think you can retrieve the job start time, but, as Dick Scherrer says, there is no built in function for this. This is true even for us Assembler dinosaurs. In 40+ years I don't think I was ever tasked with that, except in the task of analyzing SMF data, where the date and a job enters the system (which is not the same as the job start time) is a secondary key with the job name as a primary key.
steve-myers
Global moderator
 
Posts: 1953
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 210 times

Re: Job Start Time

Postby tpattison » Wed Oct 06, 2010 1:14 am

Thanks, Steve. I must agree, in 40+ years I have never needed this specific information in either Assembler or COBOL programs, and I'm not certain why this Designer thinks we need it now. I would think an immediate invocation of CURRENT-DATE would be accurate enough.
tpattison
 
Posts: 4
Joined: Tue Oct 05, 2010 10:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Job Start Time

Postby dick scherrer » Wed Oct 06, 2010 2:12 am

Hello,

Lots of old programs move the current date/time into working-storage before any "real" processing (including opens - which sometimes take a while)) is done. This is then used for report headings header/trailer time stamps for created files and whatever.

Don't see so many newer programs that do this . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 92 times

Re: Job Start Time

Postby tpattison » Wed Oct 06, 2010 2:50 am

Thank you both; the technique of immediately acquiring current date/time at the beginning of the program execution should do the trick......the Designer is even relatively happy with that approach.
tpattison
 
Posts: 4
Joined: Tue Oct 05, 2010 10:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Job Start Time

Postby dick scherrer » Wed Oct 06, 2010 3:02 am

Thanks for letting us know - good luck :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 92 times

Re: Job Start Time

Postby shindeswap » Thu Oct 14, 2010 1:26 pm

i think any job shaduler will help like CA7 is i am right dick scherrer?
shindeswap
 
Posts: 12
Joined: Sat Feb 13, 2010 1:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Job Start Time

Postby NicC » Thu Oct 14, 2010 2:27 pm

I doubt if the scheduler could pass that information into a job. I do not know when the scheduler does any symbolic substitution but even if it is at job submission time that is not necessarily the job start time.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2820
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 118 times

Next

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post