View previous topic :: View next topic
|
Author |
Message |
vicky10001 Warnings : 1 Active User
Joined: 13 Jul 2005 Posts: 136
|
|
|
|
Declaration
A - S9(10)V9(7) comp-3.
F - S9(7)V9(10) COMP-3.
KA - S9(7)V9(10) COMP-3.
PWA - 99v99.
COMPUTE A = A +
(PWA - AH(PINDX1 PINDX2) * (F ** K))
here I calculating A value. This code is working fine but its consuming more CPU time so I want to change instead of comp-3 to comp2 or comp-1 (which place I can use comp-2 or comp-1 Please let me know)
Please let me know how can change comp-3 to comp-2 or comp-1. It will give improvement or not.
Comp-3 will occupy the 9 bytes but we are converting comp-3 to comp-2 it will occupy the 8 bytes so we need to change layout also other How?
Could you please advise on this? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
make all your variables of the same type, suggest packed-decimal.
you have a mix of comp-3 and display. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
vicky10001 wrote: |
A - S9(10)V9(7) comp-3.
F - S9(7)V9(10) COMP-3.
KA - S9(7)V9(10) COMP-3.
PWA - 99v99.
COMPUTE A = A +
(PWA - AH(PINDX1 PINDX2) * (F ** K)) |
Is KA AH?
Or is A AH and KA K?
Are all fields variable for all calculations or are some fairly constant? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
1. don't send me private messages.
2. you did not respond to either reply. what you have provided is garbage. you have variables in your compute that you have not declared.
read up on the compute statement in the programmer manual for your version of cobol.
if you think making them binary will help, you need to read. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
but its consuming more CPU time |
More cpu time compared to what?
How were cpu statistics for these few instructions gathered?
As was mentioned, when you're asked for info, you need to provide it. . . |
|
Back to top |
|
|
|