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

extrating the start / end time of a job..


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Mon Aug 24, 2009 2:01 pm
Reply with quote

hi,

we have a batch schedule in non production environment where we run the batch after every test deployment. after every batch run, we need to log the time taken by each job to complete.

we use sysview in our shop. and have been doing this manually until now. we want to automate this (may be using GSVXRXAA) to access sysview using rexx and getting the job details. we have the schedule stored in a member of a pds.

could you provide insights on how to do it (can't find commands gsvxrxaa to get the start / end times) or any other way of doing it..

please let me know if i m not clear.

thanks in advance.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 24, 2009 2:04 pm
Reply with quote

SMF data would probably be easiest. In all probability the performance / capacity planning group at your site will have already preprocessed the raw SMF using a tool such as MXG or MICS to convert the data into user friendly SAS datasets.

They may even have a report which can be easily adapted to meet your needs with minimal effort required by anyone.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Mon Aug 24, 2009 2:13 pm
Reply with quote

thanks expat.

will check with sysprogs. but really doubt - because this is something going on in non-production env. so not sure if they will have it logged somewhere. i checked with my sysprog earlier this morning and he suggested to use GSVXBAT (sysview in batch) .. but really a cumbersome thing if u ask..
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Mon Aug 24, 2009 2:28 pm
Reply with quote

Using SDSF via the REXX interface?

Code:
/* REXX */                                               
trace ?r
rc = isfcalls('on')

if rc \= 0 then
  exit

isfowner  = 'PRINO*'
isfprefix = 'PRINO*'

address sdsf "isfexec i"

do ix = 1 to jname.0
  if pos("PRINOJOB", jname.ix) = 1 then
    address sdsf "isfact i token('"token.ix"') parm(np a)"
end

rc = isfcalls('off')


Above example releases a job from the input panel, more examples in the manual...
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Mon Aug 24, 2009 4:27 pm
Reply with quote

thanks.

i somehow got hold of GSVXRXAA to use sysview in rexx. it's working fine now.

thanks for ur time.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Mon Aug 24, 2009 4:31 pm
Reply with quote

attaching the code...

Code:

address 'LINK' 'GSVXRXAA'                     
address 'SYSVIEWE' "C(JOBS)"                 
address 'SYSVIEWE' "C(PREFIX "arg1")"         
parse pull msgline                           
ltype = ' '                                   
do while queued() > 0                         
  parse upper pull ltype 2 ldelim 3 ldata     
/*say ltype                                   
  say ldelim                                 
  say ldata*/                                 
  if ltype = 'H' then leave                   
end                                           
jobnameo  = pos('JOBNAME',ldata)             
typeo     = pos('TYPE',ldata)                 
jobnro    = pos('JOBNR',ldata)               
queueo    = pos('QUEUE',ldata)               
stdateo   = pos('ST-DATE',ldata)             
sttimeo   = pos('ST-TIME',ldata)                                       
enddateo  = pos('END-DATE',ldata)                                       
endtimeo  = pos('END-TIME',ldata)                                       
ccodeo    = pos('CCODE',ldata)                                         
outstr. = ''                                                           
i = 1                                                                   
do while queued() > 0                                                   
  parse pull ltype 2 ldelim 3 ldata                                     
  if ltype = 'D' then                  /* Process if data line        */
    do                                                                 
      parse var ldata =(jobnameo) jobnamex '|',                         
                      =(typeo) typex '|',                               
                      =(jobnro) jobnrx '|',                             
                      =(queueo) queuex '|',                             
                      =(stdateo) stdatex '|',                           
                      =(sttimeo) sttimex '|',                           
                      =(enddateo) enddatex '|',                         
                      =(endtimeo) endtimex '|',                         
                       =(ccodeo) ccodex '|'                             
   end                                                                   
   if ccodex > 4 | \datatype(ccodex,'N') then iterate                   
   outstr.i = jobnamex' 'typex' 'jobnrx' 'queuex' 'stdatex' 'sttimex' ',
               enddatex' 'endtimex' 'ccodex                             
   i = i + 1                                                             
 end                                                                     
                                                                         
 address 'SYSVIEWE' "C(END)"                                             
   do while queued() > 0                                                 
   pull line                                                             
   end                                                                   
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 -> CLIST & REXX

 


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