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
 

 

Alternative to use LOW VALUES

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Alternative to use LOW VALUES
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

Site Director


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

PostPosted: Thu Oct 29, 2009 8:34 pm    Post subject:
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: 1239
Location: Richfield, MN, USA

PostPosted: Fri Oct 30, 2009 9:55 am    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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: 401
Location: Mumbai

PostPosted: Fri Oct 30, 2009 4:57 pm    Post subject: Reply to: Alternative to use LOW VALUES
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm


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