It really depends on what you're doing with REXX that's causing it to munch 
CPU.  I associate CPU usage with slow processing, and since I'm not the perf & 
tune guy, I really only care about how long I have to wait for my code to 
execute to completion and do so without adversely affecting others.  

Recently, I was converting hex IP addresses and running a loop to do NSLOOKUP 
on all of them to get the DNS.  This was slow.  So I added an array for the hex 
IP with the results of the NSLOOKUP, and then checked it for the DNS info 
instead of calling NSLOOKUP when I already had the DNS.  Ultimately, about 90% 
of the IPs were the same and my stuff ran a whole lot faster. 

Things I do as a course of habit:
-large files, do not read the whole file into an array, read in and write out 
one record at a time.  Normal system i/o and blocking not affected by REXX 
EXECIO 1 record at a time read/write (which is assumed to be optimized by the 
JCL/ALLOCATE).  
-medium large files, after processing a record from the array, set it to null 
so to keep memory usage from doubling as output records are created.  
-use DROP to free memory for any array that's no longer needed 

All I can think of at the moment.  In general, don't do or use anymore than is 
necessary. 

What does your REXX do? 





--- On Wed, 3/21/12, Tim Brown <tbr...@cenhud.com> wrote:

From: Tim Brown <tbr...@cenhud.com>
Subject: rexx cpu intensive
To: IBM-MAIN@bama.ua.edu
Date: Wednesday, March 21, 2012, 11:38 AM

What can be done to prevent REXXX programs from being so CPU intensive



Thanks,



Tim Brown
Systems Specialist - Project Leader
Central Hudson Gas & Electric
284 South Ave
Poughkeepsie, NY 12601
Email: tbr...@cenhud.com <<mailto:tbr...@cenhud.com>>
Phone: 845-486-5643
Fax: 845-486-5921
Cell: 845-235-4255




This message contains confidential information and is only for the intended 
recipient. If the reader of this message is not the intended recipient, or an 
employee or agent responsible for delivering this message to the intended 
recipient, please notify the sender immediately by replying to this note and 
deleting all copies and attachments.








----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to