View previous topic :: View next topic |
Author |
Message |
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Fri Nov 25, 2005 3:31 am Post subject: Is there any JES2 command to list out long running jobs !! |
|
|
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 |
|
|
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Fri Nov 25, 2005 4:33 am Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Nov 25, 2005 9:25 am Post subject: |
|
|
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 |
|
|
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Fri Nov 25, 2005 9:13 pm Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Nov 25, 2005 11:00 pm Post subject: |
|
|
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 |
|
|
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Mon Nov 28, 2005 3:55 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Nov 28, 2005 5:41 am Post subject: |
|
|
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 |
|
|
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Mon Nov 28, 2005 8:22 pm Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Nov 29, 2005 5:27 am Post subject: |
|
|
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 |
|
|
nevilh Beginner
Joined: 11 Aug 2004 Posts: 115 Topics: 0
|
Posted: Tue Nov 29, 2005 8:16 am Post subject: |
|
|
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 |
|
|
Bill Dennis Advanced
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Tue Nov 29, 2005 11:36 am Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Nov 29, 2005 11:38 am Post subject: |
|
|
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 |
|
|
Phaninder Beginner
Joined: 06 Jul 2005 Posts: 27 Topics: 11
|
Posted: Tue Nov 29, 2005 2:48 pm Post subject: |
|
|
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 |
|
|
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Tue Nov 29, 2005 9:31 pm Post subject: |
|
|
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 |
|
|
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Tue Nov 29, 2005 10:42 pm Post subject: |
|
|
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 |
|
|
|
|