Talk About Network



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 > MOVE COMP-3 TO ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 10 Topic 4043 of 4115
Post > Topic >>

MOVE COMP-3 TO DISPLAY.

by pottmi <pottmi@[EMAIL PROTECTED] > Mar 5, 2008 at 04:00 PM

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.
-------------------

What are some options for me to change this code such that the output
of the "DISPLAY ADISPLAY" statement is "1234.5" with the constraint
that ACOMP3 and ADISPLAY must remain defined as they are?

I could come  up with some brute force way to do this, but I figure
one of you guys has to have a graceful way to do this.

--
Michael Potter




 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 Tue May 13 21:37:42 CDT 2008.