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
 

 

ifscols for start and end time of execting job in spool

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 37
Location: India

PostPosted: Thu Jan 15, 2015 6:08 pm    Post subject: ifscols for start and end time of execting job in spool
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
http://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: 51
Location: Switz

PostPosted: Thu Jan 15, 2015 7:45 pm    Post subject:
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: 37
Location: India

PostPosted: Fri Jan 16, 2015 3:05 pm    Post subject:
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: 51
Location: Switz

PostPosted: Fri Jan 16, 2015 3:14 pm    Post subject:
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: 37
Location: India

PostPosted: Fri Jan 16, 2015 4:15 pm    Post subject:
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: 51
Location: Switz

PostPosted: Fri Jan 16, 2015 4:21 pm    Post subject:
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: 37
Location: India

PostPosted: Fri Jan 16, 2015 4:24 pm    Post subject:
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: 1238
Location: Richfield, MN, USA

PostPosted: Fri Jan 16, 2015 7:55 pm    Post subject:
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: 37
Location: India

PostPosted: Fri Jan 16, 2015 10:38 pm    Post subject:
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: 51
Location: Switz

PostPosted: Mon Jan 19, 2015 1:37 pm    Post subject:
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: 37
Location: India

PostPosted: Wed Jan 21, 2015 5:14 am    Post subject:
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
http://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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
This topic is locked: you cannot edit posts or make replies. Get a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts cics & real time monitoring icehat CICS 5 Wed Sep 07, 2016 2:29 am


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