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 6 of 10 Topic 4043 of 4172
Post > Topic >>

Re: MOVE COMP-3 TO DISPLAY.

by Arnold Trembley <arnold.trembley@[EMAIL PROTECTED] > Mar 6, 2008 at 04:14 AM

pottmi wrote:
> (snip) 
> 
> The commented out MOVE statement produces this error on the latest
> version of microfocus compiler:
> 
> pottmi@[EMAIL PROTECTED]
> cob moverule.cbl
>     20     MOVE ACOMP3 TO ADISPLAY.
> *1029-
> E***************************
> **
> **    A non-integer is being moved to an alphanumeric data item
> 
> Given that, can you clarify your statement that the MOVE is legal?

I really cannot speak for Pete Dashwood, but I am sure there are COBOL 
compilers that allow the MOVE statement as written.  I think the 
Fujitsu COBOL compiler might be one.  The question is, if a particular 
COBOL compiler allows this kind of MOVE, what does it actually do?

There are versions of the IBM mainframe COBOL compiler that will 
attempt a conversion from packed decimal to zoned decimal with this 
kind of statement.  I can't recall if that includes the current 
Enterprise COBOL for z/OS, but I'm pretty sure VS COBOL II did that, 
and I was surprised when I discovered it.

I don't think there is anything in the COBOL standard that would 
prevent a COBOL compiler from treating this as a move of one string of 
characters to another, with no conversion, but perhaps Bill Klein can 
give a definitive answer.

In my opinion, it's always a bad idea to move packed-decimal data to a 
PIC X field, and I would always prefer a more explicit data 
conversion, such as Pete suggested.  So I don't think there's anything 
wrong with MicroFocus disallowing that MOVE statement.

Cheers,


-- 
http://arnold.trembley.home.att.net/
 




 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 Wed Jul 9 1:45:32 CDT 2008.