Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Instead of COMP-3 to COMP-2 or COMP-1

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Tue Apr 08, 2008 5:08 pm    Post subject: Instead of COMP-3 to COMP-2 or COMP-1
Reply with quote

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
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Apr 08, 2008 5:12 pm    Post subject:
Reply with quote

make all your variables of the same type, suggest packed-decimal.

you have a mix of comp-3 and display.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Apr 08, 2008 7:11 pm    Post subject: Re: Instead of COMP-3 to COMP-2 or COMP-1
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Apr 08, 2008 7:25 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Tue Apr 08, 2008 9:04 pm    Post subject:
Reply with quote

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
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 CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
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 Need help to populate date in COMP-3 ... chetanambi DFSORT/ICETOOL 3 Tue Jun 21, 2016 12:25 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us