Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
No of job count for an milestone job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
sen_1983us

New User


Joined: 21 May 2005
Posts: 21
Location: Hyderabad

PostPosted: Tue Jul 02, 2019 7:34 am    Post subject: No of job count for an milestone job
Reply with quote

How to fetch no of predecessor jobs for an milestones job thru rexx
Back to top
View user's profile Send private message

PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2470
Location: Netherlands, Amstelveen

PostPosted: Tue Jul 02, 2019 10:36 am    Post subject:
Reply with quote

Search all jobs for successor milestones job.
Back to top
View user's profile Send private message
sen_1983us

New User


Joined: 21 May 2005
Posts: 21
Location: Hyderabad

PostPosted: Tue Jul 02, 2019 11:15 am    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Jul 02, 2019 11:23 am    Post subject:
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 309
Location: Denmark

PostPosted: Tue Jul 02, 2019 1:24 pm    Post subject:
Reply with quote

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
View user's profile Send private message
sen_1983us

New User


Joined: 21 May 2005
Posts: 21
Location: Hyderabad

PostPosted: Tue Jul 02, 2019 4:24 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2221
Location: Hampshire, UK

PostPosted: Tue Jul 02, 2019 6:40 pm    Post subject: Reply to: No of job count for an milestone job
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 309
Location: Denmark

PostPosted: Tue Jul 02, 2019 9:25 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to count duplicate key records co... sergeyken SYNCSORT 0 Thu Jul 25, 2019 8:03 pm
No new posts Mainframe to linux file count mismatch shreya19 All Other Mainframe Topics 4 Thu Jun 13, 2019 9:49 pm
No new posts count the number of records from diff... janmejay CA Products 4 Mon Mar 25, 2019 11:29 pm
No new posts files whose record count varies with ... janmejay CA Products 0 Fri Mar 08, 2019 9:35 pm
No new posts Count the records and Create Header a... thesumitk DFSORT/ICETOOL 2 Mon Mar 04, 2019 11:18 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us