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

Alternative to use LOW VALUES


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Thu Oct 29, 2009 4:28 pm
Reply with quote

Hi,
I have a program at my shop, which is moving low values to a group variable.

Declaration

Code:

TEMP-MAP EXTERNAL.
05  TEMP-MAP-ENTRY OCCURS 3000 TIMES
                INDEXED BY TEMP-IX.

    10  TEMP-START          PIC S9(4) COMP.
    10  TEMP-LNGTH       PIC S9(4) COMP.
    10  TEMP-FIRST-SUBFLD   INDEX.



Now its moving

Code:

MOVE LOW-VALUES TO TEMP-MAP



I in my strobe report its taking 19% of the total CPU time and its occurrence of this move is just once , I would like to know is there any alternative apart from this move which can result in less CPU consumption.
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: Thu Oct 29, 2009 8:34 pm
Reply with quote

Hello,

Why do you believe this is a concern?

If a process does almost nothing (very few instructions executed), a "big move" might be the most cpu intensive. . . 20% of very little is still very little.

If done millions of times, it may be a long-running process, each iteration may not be significant.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Oct 30, 2009 9:55 am
Reply with quote

If this MOVE statement is executed only once, I find it difficult to believe that it is 19% of the total CPU usage of the entire program. Are you sure about those statistics?
Back to top
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Fri Oct 30, 2009 10:23 am
Reply with quote

HI Terry,Dick
The program in which this code is been executed in a called pgm, the occurance of the such move is once but for every call its been executed,

I would like to know that is there any other way by which I can implement the same logic by doing some thing else apart from moving low values
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Oct 30, 2009 3:32 pm
Reply with quote

10 TEMP-FIRST-SUBFLD INDEX. why do you need to define an index?

this is an EXTERNAL data item, so other modules have access.

if each time you enter the CALLed module you need to INITIALIZE the 'table',
why not make it an ODO and just INITIALIZE the counter?
Back to top
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Fri Oct 30, 2009 3:40 pm
Reply with quote

Quote:
why not make it an ODO and just INITIALIZE the counter?


Hi Dick,
i am not able to understand this point, could you please explain me this?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Oct 30, 2009 4:47 pm
Reply with quote

make the table an OccursDependingOn
or simply use a counter.

I never initialize a table.
I use a counter to control the number of active items,
and populate a new item with the data that needs to be stored.

using the counter, I know which items are active - and have been properly populated.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Fri Oct 30, 2009 4:57 pm
Reply with quote

Just curious - what code does this generate? It should be generating a single MVCL instruction but it could be generating a loop initializing each value separately. I agree that it may not need to be initialized at all because if the counters are used correctly, you'll never read old data, but it would be interesting to see how it is done. Maybe you could redefine a large single variable X(24000) or whatever the length is over the whole table and set that to low-values
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
Search our Forums:

Back to Top