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

CLIST/REXX program to monitor long running jobs ? Pls Advise


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

New User


Joined: 09 Oct 2008
Posts: 10
Location: Pune, India

PostPosted: Sat Nov 22, 2008 10:28 am
Reply with quote

Hi Friends,

Recently there have been cases in my project, where developers have either missed to monitor a Test job or in some cases they have forgotten about it completely. This has caused a serious issue.

So, I am looking for an Advise here. Is anyone familiar with some CLIST or REXX program which can be submitted before I leave office and would report me all the jobs which are still running in the TEST region (identified by accounting code) and the CPU Time they have already consumed ??

Is there any other solution to this, other than CLIST/REXX ?? Pls Advise
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Nov 22, 2008 10:42 am
Reply with quote

Hello and welcome to the forum,

If you want to make sure no test job is still running when you leave, you could use SDSF and display the active/waiting jobs. You would not need any clist or rexx code.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Nov 22, 2008 12:55 pm
Reply with quote

Aman,

You don't need a REXX/CLIST for this. Do what dick had suggested.

But there are rexx codes available for MONITORING the jobs but using REXX for monitoring the jobs running for a long time is not the best technique.

Requirements in your subject and the content are not the same.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Sat Nov 22, 2008 8:59 pm
Reply with quote

This sounds like a bad setup in respect to job classes and JES exits.

A lot of shops allow developers to submit jobs only in certain classes based upon expected resource usage. At my current shop, there are 3 classes for jobs which do not use tapes and each has a different cpu allowance, and two for tape usage again with differing cpu allowance.

The only way to resolve this situation is to implement a similar regime where developers are forced to adhere to standards or to have the jobs failed upon submission by the exits.

Why write a resource heavy REXX routine to do this when a reasonably competent systems programmer can achieve the desired results in a couple of hours with bare minimal, if any, extra resource consumption.
Back to top
View user's profile Send private message
Amanpuri

New User


Joined: 09 Oct 2008
Posts: 10
Location: Pune, India

PostPosted: Mon Nov 24, 2008 3:11 pm
Reply with quote

Dick, Aaru, expat,

Thanks for replying.

Well, I work in a multi vendor environment, where the SDSF logs 70-80 jobs at any given time. And out of these, Jobs of my interest could be 1 or 2. You can only say, that the job belongs to you after looking at the accounting information in the job card. So, checking each job is a tedious process.

To elaborate, My objective is to identify a way through which I can manage my Group's Mainframe usage. There are cases reported by the client where we have submitted a job and it has taken a lot of CPU time before it was purged. So , to eliminate this, I am seeking some help to design a utility or some Job, which can identify jobs submitted by my group during the day and can report jobs which has ran for long or still running.

Hope, this will make you understand bit more about the problem.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Nov 24, 2008 3:20 pm
Reply with quote

Hello,

I believe we understand the problem. We do not agree that this needs to be monitored manually or via code at any depth.

Proper defiinition of job classes and enforcement of what jobs run in which classes will go a long way.

Also, a better naming standard would help - all of "your" jobs would be far easier to track if they all started with the same few characters and only your group was permitted to use that "prefix".

Quote:
we have submitted a job and it has taken a lot of CPU time before it was purged.
Change the time parameter in the job statement as well as run the job in an initiator with limited cpu cycles permitted.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Nov 24, 2008 3:21 pm
Reply with quote

Talk to the systems programmers about job classes, the resource allocations and the restrictions / standards of using them before you write anything complicated for something that already exists.
Back to top
View user's profile Send private message
darkstar13

New User


Joined: 06 Nov 2008
Posts: 46
Location: Manila, Philippines

PostPosted: Tue Nov 25, 2008 9:55 am
Reply with quote

Hi,

You really don't have to look at each account info to know which jobs are from your group. Like Dick said, you can prefix your jobnames. Let's say your group name is XX, then you ask your group to use TXX (T for test) as the first 3 characters of all the jobs they'd be running in SDSF.

To check the jobs that your group has run you just have to issue
Code:
OWNER *; PRE TXX*


then issue DA to show which jobs are still running.

To then generate a summary of the CPU times, put the JESYSMSG into a file, then run a SORT job using the ff card:
Code:
 SORT FIELDS=COPY                                             
 INCLUDE COND=(23,6,CH,EQ,C'/START',OR,23,5,CH,EQ,C'/STOP')   
 OUTFIL IFTHEN=(WHEN=(23,6,CH,EQ,C'/START'),                 
                 BUILD=(15,8,                                 
                        C'  START TIME     : ',               
                        30,12)),                             
        IFTHEN=(WHEN=(23,5,CH,EQ,C'/STOP'),                   
                 BUILD=(8C' ',                               
                        C'  STOP TIME      : ',               
                        30,12,/,                     
                        8C' ',                               
                        C'  EXECUTION TIME : ',               
                        50,13,/,                     
                        40C'-')),IFOUTLEN=80

This reports execution time of each step of the job. (I got this code from one of the threads here.)

However, copying the JESYSMSG to a file then SORT maybe more tedious; better to just browse it if you have few jobs.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Nov 25, 2008 10:21 pm
Reply with quote

You might try adding NOTIFY=yourid parameter to the job card.

Try also the OUTPUT card:
Code:
//X OUTPUT DEST=xxxMVS1.PEDRO,DEFAULT=YES

which allows a second person to look at it easily.
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 Finding and researching jobs All Other Mainframe Topics 0
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Using API Gateway from CICS program CICS 0
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top