-----8<snip-----
Thanks for the replies. If I am reading the replies correctly, a move
statement 
of:

01 FIELD-1 PIC 9(3).
01 FIELD-2 PIC 9(3) COMP-3.

MOVE FIELD-1 TO FIELD-2.

Will not abend regardless of the data in FIELD-1, unless the fields are
signed.
-----8<snip-----

As Bill Klein pointed out, there is no _guarantee_ that the compiler will
generate code that will abend even if the fields are signed.  Enterprise
COBOL 3.4.1 just happens to generate such code today.  The next version of
IBM's COBOL compiler might generate different code.

BTW - OS/VS COBOL 2.4 generates a PACK followed by a ZAP for the MOVE
regardless of whether the sending field is signed or not.  If the sending
field isn't signed it also generates a NI and an OI, no doubt for sign
fixup.

Apparently I mistakenly took the OS/VS COBOL compiler's behavior as standard
and correct.

-----8<snip-----
There is no way to control this trough a COBOL compiler option or LE runtime

option?
-----8<snip-----

It doesn't look like it.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to