Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: CLIST/REXX program to monitor long running jobs ? Pls Advise
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

Site Director


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

PostPosted: Sat Nov 22, 2008 10:42 am    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Sat Nov 22, 2008 12:55 pm    Post subject: Reply to: CLIST/REXX program to monitor long running jobs ?
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: 8593
Location: Back in jolly old England

PostPosted: Sat Nov 22, 2008 8:59 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Mon Nov 24, 2008 3:20 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 24, 2008 3:21 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Tue Nov 25, 2008 10:21 pm    Post subject: Reply to: CLIST/REXX program to monitor long running jobs ?
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    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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us