Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
vicky10001
Warnings : 1

Active User

Joined: 13 Jul 2005
Posts: 136

 Posted: Tue Apr 08, 2008 5:08 pm    Post subject: Instead of COMP-3 to COMP-2 or COMP-1 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?

dbzTHEdinosauer

Global Moderator

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

 Posted: Tue Apr 08, 2008 5:12 pm    Post subject: make all your variables of the same type, suggest packed-decimal. you have a mix of comp-3 and display.
CICS Guy

Senior Member

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

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

 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?
dbzTHEdinosauer

Global Moderator

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

 Posted: Tue Apr 08, 2008 7:25 pm    Post subject: 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.
dick scherrer

Site Director

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

Posted: Tue Apr 08, 2008 9:04 pm    Post subject:

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. . .
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us