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

JCL job using 34 ~ 45 % under CPU% factor


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Mon Jun 14, 2010 7:19 pm
Reply with quote

Hi All.

The JCL I am running scans thru 2000 modules using a Rexx program I have written.
For scanning 200 modules , the Job ran in approximately 1 minute.

So expecting 10~12 mins run time for 2000 modules i ran the job but when i see the CPU % used by my job, it was flucntuating b/w 35 % to 45% ..

This I see when in spool i give DA on command line.

I first thought its the region parameter, had it as 5M so changed it to 256K .. but no effect.

Would appreciate inputs on what affects the CPU % which a job takes up..

My job :
000001 //SELEC JOB (XXXX,YYY,ZZZ)
000002 // CLASS=R, R=SHRT,P=
000003 // COND=(12,LE),
000004 // MSGCLASS=9,
000005 // NOTIFY=&SYSUID,
000006 // REGION=256K,
000007 // TIME=(1440),
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jun 14, 2010 7:22 pm
Reply with quote

i would check line 125 of Your rexx script, that' s where the cpu is looping
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Jun 14, 2010 7:23 pm
Reply with quote

The quality of the code
What other jobs are processing to limit the amount of CPU available to you

Just a matter of curiosity - why did you reinvent the wheel when 3.13 works wonderfully well in 99% of cases.
Back to top
View user's profile Send private message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Mon Jun 14, 2010 7:26 pm
Reply with quote

I don't think the Rexx program is looping as I did sample runs and Rexx is working fine..

I wanted to actually clarify that what determines that my job would get how much CPU % when there are many people running jobs with same priority as mine.

Understand that all would be interested to see the whole code before commenting .. but its just tooo huge..
Back to top
View user's profile Send private message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Mon Jun 14, 2010 7:30 pm
Reply with quote

I had to find out in which all modules, initialization happens at item level in an cobol array ..
Example: following are some instances of initialization at item level..
Move SPACES to Z(1)
or Move SPACES to
XXXXXXXXX(YYYYYYYYYYYYYYYY)

Since 2 lines consequently could have initialization i had to try my hand on rexx. ( newbie to it )
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jun 14, 2010 7:31 pm
Reply with quote

what do You want form us!
You are telling that some process is using a certain % of CPU
OK! that' all we can say!

post useful info and You will get different replies
see
catb.org/~esr/faqs/smart-questions.html
on how to get the most when asking

Quote:
So expecting 10~12 mins run time for 2000 modules i ran the job but when i see the CPU % used by my job, it was flucntuating b/w 35 % to 45% ..

what relation do You expect it should exists between elapsed and CPU % ???
Back to top
View user's profile Send private message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Mon Jun 14, 2010 7:31 pm
Reply with quote

Also , with so many people working simultaneously on our mainframe.. i don wanna be the one who takes away the max CPU time.. so how do i limit this 35 % to say like 5~10 % via JCL.. is there a way ?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Jun 14, 2010 7:33 pm
Reply with quote

But my question still remains. Why did you waste however long it took you to write the REXX code when 3.13 would have done this for you, and is almost certainly less resource hungry than your home grown code.

Let's face it, what benefit do your employers get from you wasting time creating a far less efficient version of something that already exists and comes for free

Compare the usage of 3.13 in batch against your REXX.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jun 14, 2010 7:37 pm
Reply with quote

Quote:
Also , with so many people working simultaneously on our mainframe.. i don wanna be the one who takes away the max CPU time.. so how do i limit this 35 % to say like 5~10 % via JCL.. is there a way ?


don' You thing than WLM or even the older SRM might be smarter than You in balancing the workload

if Your job uses a certain amount of CPU is because the powers of zOS decided that it is safe

topic going down the sink going to be deleted shortly
today is not psychic day, is get rid of useless topic day
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 14, 2010 7:37 pm
Reply with quote

Quote:
I first thought its the region parameter, had it as 5M so changed it to 256K .. but no effect.
My first thought ... WHY ON EARTH WOULD YOU THINK REGION SIZE WOULD AFFECT CPU USAGE??????

There are some cases where reducing the region size could impact CPU usage -- but mostly it would make CPU usage go up as thrashing started and page counts went through the roof. This is much like burning down your house to get rid of termites -- yeah, the termites are gone but now you've got worse problems.

CPU consumption is based upon the work done by the program -- not the region size, not the number of data sets, not even where the data sets are located.
Back to top
View user's profile Send private message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Mon Jun 14, 2010 7:39 pm
Reply with quote

3.13 as i know is to compare 2 datasets.

Consider the following scenario pls :
Module 1:
Move Zero to Array1(index1)
Module 2:
Move Zeroes to
Array 2 ( index 4 )
Module 3:
Move Spaces to Array 3 ( 2)

All of the above modules qualify my requirement since in them there is item level initialization for some array .. doesn't matter which array..

In end -> we have to find a number -> how many modules have item level initilizations for Arrays out of the 2000 modules ?

Would 3.13 help with this.

TIA
Back to top
View user's profile Send private message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Mon Jun 14, 2010 7:42 pm
Reply with quote

Well, why I was anxious about the CPU usage high was in recent past,
for our team members , jobs were not running as a oarticulat job was taking 78% CPU % ... so it was shared that since tat job is taking all the resources , others are not getting any CPU usage..
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Jun 14, 2010 7:42 pm
Reply with quote

sunny_io wrote:
Would 3.13 help with this.
Would I have suggested it for fun ?
That is exactly what 3.13 is for, finding things in datasets and PDS's
Back to top
View user's profile Send private message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Mon Jun 14, 2010 7:43 pm
Reply with quote

Robert Sample : WHY I THOUGHT SO --> cause I am new and wasn't tought the basics and was directly in a customized project.. didn't get to learn the basics..
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Jun 14, 2010 7:45 pm
Reply with quote

Quote:
job was taking 78% CPU %
The mind boggles icon_rolleyes.gif
Back to top
View user's profile Send private message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Mon Jun 14, 2010 7:47 pm
Reply with quote

Expat - and is 3.13 flexible enough for the following scenario also ?

028900 MOVE ZEROES TO D00071-TB-1ST-DG-SUB
029000 (D00071-TB-IDX)

now the initialization is in 2 lines since the Array name D00071-TB-1ST-DG-SUB is too big ... so index is in next line..

My search is like :

Move ZEROES TO XYZ ( abc )

xyz CAN BE ANY combination of letters symbols and numbers
same goes for the index name..
and the statement can span in 2 lines...

What remains always in the statement is - MOVE , ZEROES/ZERO/ , ( , ) , TO

If yes, i'll go ahead , take a breakk and read about 3.13
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 14, 2010 7:51 pm
Reply with quote

Okay, now go learn about Workload Manager -- WLM -- (it's in the MVS bookshelf in the library at IBM's web site). If your job is running 35-40% of the CPU, it is because WLM has found that there is no workload with a higher priority requiring the CPU time. Of course, if you're running something like this as a production job, I'm sure someone at your site will set you straight before long.

And you need to be aware that computer work rarely scales up in a linear fashion -- if 200 members take 1 minute, it is not very likely that 2000 members will take 10 minutes. 20 to 40 minutes, I can see -- but not 10.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jun 14, 2010 7:52 pm
Reply with quote

Your curiosity about zOS working can be easily satisfied by

publibz.boulder.ibm.com/zoslib/pdf/zosbasic.pdf

or by he whole series of the ABC of ZOS system programming
search the forums or
www.redbooks.ibm.com/
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Mon Jun 14, 2010 7:53 pm
Reply with quote

Enrico,

ROFLMAO unless you really have the code.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jun 14, 2010 7:55 pm
Reply with quote

Quote:
If your job is running 35-40% of the CPU, it is because WLM


already expressed a similar concept,
we might have a case of split personality
the person who writes the questions is not the same person who reads the answers icon_evil.gif

but most probably the person who reads the answers does not exist icon_biggrin.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jun 14, 2010 8:09 pm
Reply with quote

Hi Dave
what really bothers me is that I am giving an illogic reply in order to wake up somebody' s neurons,
and all i get is
Quote:
I don't think the Rexx program is looping as I did sample runs and Rexx is working fine..
I wonder icon_rolleyes.gif
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 Jun 14, 2010 8:32 pm
Reply with quote

Hello,

Quote:
I don't think the Rexx program is looping as I did sample runs and Rexx is working fine..
Well, there is a difference between looping and being stuck in a loop. . . By the definition of the requirement, this process is looping.

Suggest you experiment with 3.13 and remember F1 has lots of information. . .
Back to top
View user's profile Send private message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Mon Jun 14, 2010 8:54 pm
Reply with quote

Dear All..
I will make time later tonight to browse thru WLM

So I get it where I stand as of today..

Would you be willing to point me in right direction on how to strengthen my basics on mainframes.
The web and IBM sites and ebooks number too many and my stay on earth is short icon_smile.gif
So a planned approach to learn it all is what I seek from you all.

Which IBM pdf to start with and I will keep you all posted on my progress.
My interest point is JCL and REXX. But As I tried few new jobs, I end up lamenting the very little knoweldge base i have of the system as a whole ( memory management etc ) ...

Regards
Sunny
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jun 14, 2010 9:02 pm
Reply with quote

Quote:
Which IBM pdf to start with and I will keep you all posted on my progress.

the question is a blatant demonstration of the split personality issue ( writing and not reading )

the info You ask for has already been posted

I wonder why we have to waste time for somebody who does not care to read the answers to his posts icon_evil.gif
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 Jun 14, 2010 9:16 pm
Reply with quote

Hello,

Quote:
So a planned approach to learn it all is what I seek from you all.
Just so you understand. . . No one here has yet "learned it all" and we have some people who have more than 45 years experience. . .

Indeed, all of us combined have not "learned it all". . .

The way to strengthen your basics is repetition. Read and then practice what you read on the system - using test code, data, etc.

You are your best single resource. . .
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 -> JCL & VSAM Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts what factor decide the CPU time per Tran All Other Mainframe Topics 1
No new posts What factor we want consider to prepa... Testing & Performance 1
No new posts FILTER FACTOR DB2 4
Search our Forums:

Back to Top