MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is there any JES2 command to list out long running jobs !!
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Fri Nov 25, 2005 3:31 am    Post subject: Is there any JES2 command to list out long running jobs !! Reply with quote

Hey Techfundoos,

Is there any JES2 command I can give on the Console to find out if some jobs are running for say more than 2 hours. Basically our production system is going big and so we need to implement this somehow. If there is any thing related to finding out long running jobs, please do let me know.

Thanks,
Amit Joshi
Singapore.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Fri Nov 25, 2005 4:33 am    Post subject: Reply with quote

My question is : Is there any JES2 $ command that I can give on the Console to find out jobs that are running for quite sometime. Or else can I atleast find out the list of only jobs which are not started tasks or other system jobs and list out only jobs which the application folks are running. I do not want all LLAs, RACF and other STCs in the listing...only jobs which are started by Users and not systems. D A,L actually gives me a very vast list.

Pls help.

Thanks,
Amit Joshi.
_________________
I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Nov 25, 2005 9:25 am    Post subject: Reply with quote

Not JES2, but TASID can show a list of just jobs and you can sort the list by CPU time, elapsed time, and many other criteria. SDSF may have the same fields (I can't check right now) and all SDSF fields can be sorted also.
Back to top
View user's profile Send private message Visit poster's website
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Fri Nov 25, 2005 9:13 pm    Post subject: Reply with quote

hey semigeezer thanks for your reply but can you give me the exact command which I need to type on the console to get the jobs listed by their CPU time. I can capture the output in a data set and do the processing, but getting that list of jobs is the main criteria.

Thanks,
Amit Joshi.
_________________
I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Nov 25, 2005 11:00 pm    Post subject: Reply with quote

I don't think there is a console command for this. There are tools available that run within ISPF, or you could write a rexx exec that chases control blocks, but there is no operator command that I know of that does it. I would think that there are programs on the CBT tape to get job information also and you might be able to run them and trap their output.
Back to top
View user's profile Send private message Visit poster's website
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Mon Nov 28, 2005 3:55 am    Post subject: Reply with quote

Hey Semigeezer I found the below command from JES2 Commands Manual and got the expected result :

$D Job(*),hours>2

But it lists out STC and other System jobs as well and since I know my Production jobs start with P and CLASS=P, I used the below command to filter my results further :

$D Job(*),hours>2,JM=P*,CLASS=P


Am I missing something here?? Or was my query unclear ??

Regards,
Amit Joshi.
_________________
I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Nov 28, 2005 5:41 am    Post subject: Reply with quote

amit4u79,

Are you authourized to issue JES Commands? Most application programmers do not have the authority to issue them.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Mon Nov 28, 2005 8:22 pm    Post subject: Reply with quote

Hi Kolusu, I am not working on application am working on System Automation side...so I have authority to issue the display JES command and this is one of the automation item I am working on is "to alert the Operations when any "Batch" Job runs for more than 2 hours.
Any help or direction is most welcome. I just want some JES comand to find out if any active job runs for more than 2 hours. We have the rexx and stuffs in place to capture the command output from console.

Thanks,
Amit Joshi.
_________________
I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Nov 29, 2005 5:27 am    Post subject: Reply with quote

Quote:

I am working on is "to alert the Operations when any "Batch" Job runs for more than 2 hours.


Are we talking about 2 hours of CPU time or Elapsed time? 2 hours of CPU is a very long time. Most shops have time limit for each Job class. Once the job exceeds that time , it will automatically be cancelled.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nevilh
Beginner


Joined: 11 Aug 2004
Posts: 115
Topics: 0

PostPosted: Tue Nov 29, 2005 8:16 am    Post subject: Reply with quote

The jes command you are submitting will show all jobs that meet the criteria. This means that jobs that have not yet run and jobs that ran last week will be displayed as well as the active jobs. I don't believe this is what you want
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Tue Nov 29, 2005 11:36 am    Post subject: Reply with quote

To see only executing jobs, qualify with:

$DJ(*),HOURS>2,Q=XEQ

The job's "age" in HOURs may also reflect time spent waiting on input queue!
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Nov 29, 2005 11:38 am    Post subject: Reply with quote

As I said, I know of no JES2 command to do this, but try this:
Code:
/* Rexx - Print running jobs and their elapsed times - Doug Nadel    */
Numeric digits 20                                                       
cvt=ptr(16)                            /* Get CVT                    */
asvt=ptr(cvt+556)+512                  /* Get asvt                   */
rmct=ptr(cvt+x2d('25c'))                                               
asvtmaxu=ptr(asvt+4)                   /* Get max asvt entries       */
Do a = 0 to asvtmaxu - 1                                               
  ascb=stg(asvt+16+a*4,4)              /* Get ptr to ascb (Skip         
                                          master)                    */
  If bitand(ascb,'80000000'x) = '00000000'x Then /* If in use        */
    Do                                                                 
      ascb=c2d(ascb)                   /* Get ascb address           */
      cscb=ptr(ascb+56)                /* Get CSCB address           */
      chtrkid=stg(cscb+28,1)           /* Check addr space type      */
      ascbjbni=ptr(ascb+172)           /* Get ascbjbni               */
      If chtrkid='03'x & ascbjbni<>0 Then                               
        Do                                                             
          oucbomvs = bitand(stg(37+ptr(ascb+144,4),1),'10'x)           
          if oucbomvs ='00'x then                                       
            do                                                         
              ascbints = stg(ascb+304,4) /* job selection time       */
              rmcttoc = stg(rmct+128,4) /* rmf current time          */
              delta=((c2d(rmcttoc)-c2d(ascbints))*1.048576)%1 /* secs*/
              hh=delta %3600                    /* Get # of hours    */
              mm=right((delta//3600)%60,2,'0')  /* get # of minutes  */
              ss=right((delta//3600)//60,2,'0') /* get # of seconds  */
              Say stg(ascbjbni,8) delta 'sec ('hh':'mm':'ss')'         
            end                                                         
        End                                                             
    End                                                                 
End                                                                     
Return                                                                 
/*-------------------------------------------------------------------*/
ptr:  Return c2d(storage(d2x(Arg(1)),4))     /* Return a pointer */     
/*-------------------------------------------------------------------*/
stg:  Return storage(d2x(Arg(1)),Arg(2))     /* Return storage */
Back to top
View user's profile Send private message Visit poster's website
Phaninder
Beginner


Joined: 06 Jul 2005
Posts: 27
Topics: 11

PostPosted: Tue Nov 29, 2005 2:48 pm    Post subject: Reply with quote

Hi Kolusu ,
How to Know the default time allocated to each class in any system?
I it possible or only need to contact the Sys Admin?


Thanks
--------
phani
Back to top
View user's profile Send private message
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Tue Nov 29, 2005 9:31 pm    Post subject: Reply with quote

Hi Semigeezer,

Thanks a lot for your REXX. It is perfect to my requirement. However, I just wanted to get some information for the REXX.
Would it list out only Active Jobs and their elapsed time ??
Would the list also contain Started Tasks, Subsystem tasks, or other system tasks or just application batch jobs ??

I only want to list out times of application batch jobs.

Let me know so that I can proceed with this rexx in production.

Thanks,
Amit Joshi.
_________________
I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Tue Nov 29, 2005 10:42 pm    Post subject: Reply with quote

Hi Semigeezer,

I am implementing your REXX in our production system, but apart from answer to questions in my above post also need some favour from you.
My project manager has asked me for maintenance purpose to document the REXX. Kindly answer these queries:
1) How are we going to maintain the program If ACB control block structure changes in production ? what changes would we have to do to the REXX then ?
2) I am asked to document the ACB control block and its structure, so please provide me the reference book from where I can get information about all the pointers and control blocks used in your REXX.

Thanks in advance.

Regards,
Amit Joshi.
_________________
I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group