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

ifscols for start and end time of execting job in spool


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 44
Location: India

PostPosted: Thu Jan 15, 2015 6:08 pm
Reply with quote

Hi Everyone,

I am trying to develope a tool in rexx to monitor long running jobs.
I will be submitting a job every 1 hour using FTP process by PSJ thru my desktop schedular.

I just want to extract jobs in execution state and take the jobname and start time.

I have searched forum and found below below code
ibmmainframeforum.com/viewtopic.php?f=31&t=6411

I am unable to capture Start time

Could any one please let me know what is
Isfcols for start and end time.

Thanks
Basha.
Back to top
View user's profile Send private message
Paul Voyner

New User


Joined: 26 Nov 2012
Posts: 52
Location: UK

PostPosted: Thu Jan 15, 2015 7:45 pm
Reply with quote

Type COLSHELP from ST panel to see all available ISFCOLS, or else in the REXX do "say ISFCOLS"

You'll see the columns are called TIMEE and DATEE
Back to top
View user's profile Send private message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 44
Location: India

PostPosted: Fri Jan 16, 2015 3:05 pm
Reply with quote

Hi all,



Thanks for the reply



Below is my code (copied from forum - Enrico's)



/*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
Trace "O"
Parse Source _sys _how _cmd .
parse arg args

IsfRC = isfcalls("ON")
if IsfRC ª= 0 then do
say "isfcalls RC" IsfRC
exit
end

isfprefix = "WR*"
isffilter = "queue = EXECUTION"
/*isfcols = "jname jobid ownerid actsys ISYSID"*/

Address SDSF "isfexec st"
if RC ª= 0 then do
say "isfexec RC" RC
exit
end

do i = 1 to jname.0
say jname.i jobid.i ownerid.i actsys.i jprio.i timee.i
end
call isfcalls "OFF"
exit





Output:

WRJOBBTV S0256914 WRVT RCQ4 15 TIMEE.1
WRMVSTV S0256920 WRMV RCQ4 15 TIMEE.2
WRVFDBTV S0256922 WRVF RCQ4 15 TIMEE.3



But St-time of the job is not getting displayed instead am getting above results.



Please help me in this regard. I want to view the start time and start date.
Back to top
View user's profile Send private message
Paul Voyner

New User


Joined: 26 Nov 2012
Posts: 52
Location: UK

PostPosted: Fri Jan 16, 2015 3:14 pm
Reply with quote

Try Address SDSF "isfexec st (ALTERNATE"
Back to top
View user's profile Send private message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 44
Location: India

PostPosted: Fri Jan 16, 2015 4:15 pm
Reply with quote

Hi paul,

Thanks for the reply.
When I issue COLSHELP

Staright to column st-time delayed? Is marked as X

Would that be a problem.
Back to top
View user's profile Send private message
Paul Voyner

New User


Joined: 26 Nov 2012
Posts: 52
Location: UK

PostPosted: Fri Jan 16, 2015 4:21 pm
Reply with quote

Hi,
Try Address SDSF "isfexec st (ALTERNATE DELAYED"
Back to top
View user's profile Send private message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 44
Location: India

PostPosted: Fri Jan 16, 2015 4:24 pm
Reply with quote

Wow paul

You are a genius. Thanks a lot paul its working.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Jan 16, 2015 7:55 pm
Reply with quote

Khadhar,
In the future, please use the Code tags to indicate actual character spacing:
Code:
/*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
Trace "O"
Parse Source _sys _how _cmd .
parse arg args

IsfRC = isfcalls("ON")
if IsfRC ª= 0 then do
say "isfcalls RC" IsfRC
exit
end

isfprefix = "WR*"
isffilter = "queue = EXECUTION"
/*isfcols = "jname jobid ownerid actsys ISYSID"*/

Address SDSF "isfexec st"
if RC ª= 0 then do
say "isfexec RC" RC
exit
end

do i = 1 to jname.0
say jname.i jobid.i ownerid.i actsys.i jprio.i timee.i
end
call isfcalls "OFF"
exit
Back to top
View user's profile Send private message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 44
Location: India

PostPosted: Fri Jan 16, 2015 10:38 pm
Reply with quote

Hi Terry,

Thanks I will follow the same in future.

Rexx experts,
Is there any function that compare two date and time and give the difference.

Say i have job start time1 is 15016(julian date) 23:40:30
Job end time is 15017 01:05:30

There would be actually 00:25:00 mins difference.

How could i achieve it. Please help.
Back to top
View user's profile Send private message
Paul Voyner

New User


Joined: 26 Nov 2012
Posts: 52
Location: UK

PostPosted: Mon Jan 19, 2015 1:37 pm
Reply with quote

Khadar, Rexx doesn't give you any functions to do this, so you have to do some coding. Take a look at the following, it converts date and time formats to number of seconds since year 2000. Then you can easily check the difference between 2 different datetime values.

Code:
/*rexx*/
trace n
d = '15042'
t = '01:23:45'
secs1 = GetSecs(d,t)
d = '15044'
t = '23:22:21'
secs2 = GetSecs(d,t)
say "Difference in seconds between datetime values="secs2 - secs1
return

GetSecs: Procedure
 arg d,t
 /* Convert year into seconds since 2000*/
 yy = left(d,2)
 ddd = right(d,3)
 leap = trunc(yy/4)
 yearsecs = yy*365*24*60*60
 /* Add yeap years                      */
 yearsecs = yearsecs+leap*24*60*60
 daysecs  = ddd*24*60*60
 /* Add time                            */
 parse var t hh':'mm':'ss
 timesecs= hh*60*60 + mm*60 +ss
return yearsecs+daysecs+timesecs
Back to top
View user's profile Send private message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 44
Location: India

PostPosted: Wed Jan 21, 2015 5:14 am
Reply with quote

Hi Paul,

Thanks a lot for the code. Now am able to extract start time of job as well place current time using TIME() function.
With the above details am using DFSORT to calculate the time.
Got it from below link
ibmmainframes.com/about54109.html

Thanks all for helping me:)
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 -> IBM Tools

 


Similar Topics
Topic Forum Replies
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 Parallelization in CICS to reduce res... CICS 4
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
Search our Forums:

Back to Top