View previous topic :: View next topic
|
Author |
Message |
sen_1983us
New User
Joined: 21 May 2005 Posts: 21 Location: Hyderabad
|
|
|
|
How to fetch no of predecessor jobs for an milestones job thru rexx |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Search all jobs for successor milestones job. |
|
Back to top |
|
|
sen_1983us
New User
Joined: 21 May 2005 Posts: 21 Location: Hyderabad
|
|
|
|
This request is to get interim updates when batch is running , we need to get count of jobs to reach milestone job
Ex Morning 9AM 100 jobs to reach milestone job
At 10 AM there will be 50 jobs to reach milestone job
This need to run in automated script |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Define a milestone job, and also please explain why this number is so important to someone. It sounds like a requirement for the sake of being required to me.
Any reason that it must be REXX rather than anything else |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
You can do the equivalent of SDSF ST in REXX by using the SDSF REXX API. and then count the jobs in their various states. See the manual 'SDSF User's Guide' chapter 'Using SDSF with the REXX programming language' for details. Or search this forum, I'm sure the API has been discussed here.
Though I would think that this exercise could be done better in the / a scheduler? |
|
Back to top |
|
|
sen_1983us
New User
Joined: 21 May 2005 Posts: 21 Location: Hyderabad
|
|
|
|
Im looking script so that we can get get interim status for milestones jobs as part of batch monitoring so that this can be used as dashboard
Also this can this done by any tools? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Still do not know what "milestone job" is. If you are using a scheduler - and with that number of dependencies you should be - your scheduler should be able to provide a list of incomplete pre-req jobs and their status - running, broken, waiting, etc. There may even be a Rexx interface allowing you to pull the reports and process them to provide what you want in the format that you want. So ask your scheduling group and/or the software support person(s) for the scheduler. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
Ok, here is a REXX sample of mine.
Code: |
/* REXX
Do SDSF STatus
Lst each entry with rc, read-, start- and endtime
*/
zz=isfcalls('ON')
isfprefix=userid() /* <- jobname/prefix */
Address SDSF "ISFEXEC ST (delayed)"
if rc<>0 then exit msgrtn(rc) /* List any error messages */
say 'Jobname Job-id Queue Retcode ',
'Date-time-read Date-time-start Date-time-end'
do jn=1 to jname.0 /* Loop for all rows returned */
say l8(JNAME.jn) l8(jobid.jn) left(queue.jn,9),
l8(retcode.jn,0),
fdt(dater.jn,timer.jn) fdt(datee.jn,timee.jn) fdt(daten.jn,timen.jn)
end
exit 0
l8: return left(arg(1),8)
l8r=''
do l8n=1 to words(arg(1))
l8r=l8r left(word(arg(1),l8n),8)
end
return l8r
FDT:
trace off
arg fdtd,fdtt
if fdtd<>'' then do
fdtd=date('b',left(fdtd,4)'0101','s')
fdtd=date('s',fdtd+right(fdtd,3),'b')
fdtd=nicedate(fdtd)
end
else fdtd=copies(' ',10)
return fdtd left(fdtt,8)
NiceDate: return Insert('-',Insert('-',word(arg(1) date('s'),1),6),4)
msgrtn: procedure expose isfmsg isfmsg2.
say 'sdsf rc:' arg(1)
if isfmsg<>"" then Say "isfmsg is:" isfmsg
do ix=1 to isfmsg2.0
Say "isfmsg2."ix "is:" isfmsg2.ix
end
return 0 |
The manual 'SDSF User's Guide' chapter 'Using SDSF with the REXX programming language' has a number of samples. Please read that chapter, try the samples and then ask if it does not work. |
|
Back to top |
|
|
|