Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Cobol > Re: MOVE COMP-3...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 10 Topic 4043 of 4196
Post > Topic >>

Re: MOVE COMP-3 TO DISPLAY.

by Howard Brazee <howard@[EMAIL PROTECTED] > Mar 6, 2008 at 07:58 AM

On Wed, 5 Mar 2008 16:00:26 -0800 (PST), pottmi <pottmi@[EMAIL PROTECTED]
>
wrote:

>COBOL Crew,
>
>This code is broken because the non-integer move to alphanumeric is
>illegal.
>--------------------
>01 ACOMP3 PIC 9999v9 COMP-3.
>01 ADISPLAY PIC X(6).
>
>MOVE 1234.5 to ACOMP3.
>MOVE ACOMP3 TO ADISPLAY.
>DISPLAY ADISPLAY.
>-------------------

Most compilers I've used allow simple displays of the packed data. I'm
trying to remember the syntax of the compiler that required a
conversion in the display.   Something like DISPLAY ACOMP3 WITH
CONVERSION.    

I routinely add some fields such as:
D01  DISPLAY-FIELDS.                            
D    05  DISPLAY-NDX         PIC 9(05).         
D    05  DISPLAY-SORT        PIC Z(05).         
D    05  DISPLAY-AMT1        PIC ++,+++,+++.99. 
D    05  DISPLAY-AMT2        PIC ++,+++,+++.99. 

Before I display most numbers, I move it here to see it better.
D    MOVE AMOUNT-INDEX     TO DISPLAY-NDX
D    MOVE MY-AMOUNT (AMOUNT-INDEX)      TO DISPLAY-AMT1
D    DISPLAY 'DEBUG 01 - MY-AMOUNT (' DISPLAY-INDEX ')="'
D        DISPLAY-AMT1 '"'.
 




 10 Posts in Topic:
MOVE COMP-3 TO DISPLAY.
pottmi <pottmi@[EMAIL   2008-03-05 16:00:26 
Re: MOVE COMP-3 TO DISPLAY.
"Pete Dashwood"  2008-03-06 13:48:48 
Re: MOVE COMP-3 TO DISPLAY.
spambait@[EMAIL PROTECTED  2008-03-06 02:36:56 
Re: MOVE COMP-3 TO DISPLAY.
docdwarf@[EMAIL PROTECTED  2008-03-06 01:26:24 
Re: MOVE COMP-3 TO DISPLAY.
pottmi <pottmi@[EMAIL   2008-03-05 18:17:18 
Re: MOVE COMP-3 TO DISPLAY.
Arnold Trembley <arnol  2008-03-06 04:14:58 
Re: MOVE COMP-3 TO DISPLAY.
"Pete Dashwood"  2008-03-07 10:19:02 
Re: MOVE COMP-3 TO DISPLAY.
"Rick Smith" &l  2008-03-06 19:34:38 
Re: MOVE COMP-3 TO DISPLAY.
"Pete Dashwood"  2008-03-07 14:48:53 
Re: MOVE COMP-3 TO DISPLAY.
Howard Brazee <howard@  2008-03-06 07:58:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 3:16:16 CDT 2008.