View previous topic :: View next topic
|
Author |
Message |
S0C7
New User
Joined: 19 May 2006 Posts: 26
|
|
|
|
Hi,
I've just started working in a new project. There seems to be many programs which have unused variables declared in working storage but not getting used anywhere in the program.
Can anyone throw some light on the run-time performance impact because of unused variables that have been defined in working storage? Since the program will occupy extra memory space while running, there has to be some performance impact on the mainframe system.
I know the frequency with which these programs run, I just need to know if there is a field, say PIC X(10), then what is the performance impact for a single run?
I just need to know if correcting these programs is actually worth the effort? I am guessing it's not. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1248 Location: Richfield, MN, USA
|
|
|
|
I doubt you'll notice any run time performance difference at all, but your load module is obviously larger than it needs to be. For the sake of cleaning things up, I'd opt to remove the unreferenced fields. Make sure they really are unreferenced though. |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
Unless there are so many unused variables and they are so large that it causes variables to span pages and cause paging, you won't notice any difference at all. Even the load lib may be the same size since all that will change is the size of a getmain. Clean them up to help maintainability but forget performance on this one. You might save a base register and have optimization change but it will be minimal and not worth the effort. It probably took longer to ask the question than the amount of runtime you'll save over the life of the program. |
|
Back to top |
|
|
belchoff
New User
Joined: 21 Oct 2009 Posts: 4 Location: UK
|
|
|
|
Initializing can take some toll, especially if there are lot of variables not to mention for unused variables. Cleaning them up can help improve readability. |
|
Back to top |
|
|
rehan
New User
Joined: 13 May 2007 Posts: 6 Location: India
|
|
|
|
Just to add to this say my system has somewhere around 2000 modules and each module has 65 bytes of unused space[X(65)] does that count to billing from IBM? |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
If you compile with the OPTIMIZE(FULL) option, all the unused variables will be noted in the listing.
It's then just a matter of removing them from the source....
Bill |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
You should have started a new topic rather than tagging onto the end of one inacitve for a year and a half.
Does your billing from IBM include used storage? If so, then those bytes would count. However, since IBM billing is usually based on system capacity (as measured by MSU overall, 4-hour rolling MSU usage, or whatever your site is contracted for), the answer most likely will be that extra bytes of memory has ZERO impact on vendor billing. |
|
Back to top |
|
|
rehan
New User
Joined: 13 May 2007 Posts: 6 Location: India
|
|
|
|
Thanks bill and rob for the guidance and ya i should have started a new topic but was looking for this on forum and found relevant ... neways will consider it next time |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
neways? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Nic,
From the "chat-speak" or texting . . . =Any Ways |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
I know that, Dick (nice to see you back!) I worked it out but for the sake of 1 letter.....And we are constantly saying we do not like "chat-speak" language. It was just a hint to the OP (took me a few minutes to work out what OP was when I first came across it and even longer for TS!) |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
rehan wrote: |
Thanks bill and rob |
1. Robert is elder to me.
2. He is a Senior System Programmer.
3. I look up to Him and read His answers carefully.
4. I've met Him personally and He is over 6'3" tall.
5. His experience, alone, in to zOS is much more than my own. I've not yet included the experience of Bill yet.
.
.
.
SPELL His name correctly! |
|
Back to top |
|
|
|