Cobol has messages for numeric truncation.  Because they are warnings, 
programmers tend to treat them as noise and ignore them.

I am very much spoiled by the colorful interfaces in ISPF edit now.  They 
show simple mistakes dramatically.  Any interface that can show the error 
in color at edit time is preferable to a assembly time message.  I think 
this kind of development tool is called IDE.

Richard Kuebbing

IBM Mainframe Assembler List <[email protected]> wrote on 
04/30/2015 06:23:54 PM:

> From: Ed Jaffe <[email protected]>
> A working program had the following code:

> 018000              MVC   0(8,R1),=CL8'EJESPOP'     Set command name
> 018010              MVC   8(8,R1),=CL8'PATHNAME'    Set command 
parameter

> An overzealous programmer, trying to be helpful, changed it to:

> 018000              MVC   0(16,R1),=CL8'EJESPOP PATHNAME' Set cmd 
name/parm

> which introduced a problem that wasn't discovered until a very 
> inopportune time.

> Of course, there is no substitute for thorough testing. But, it occurs 
> to me that the assembler could issue a warning when data is lost from 
> truncation as the result of a nominal value requiring more bytes than 
> are explicitly specified via a length modifier.

> Single-byte character constants are the data type in which I'm 
> interested, but an argument might exist for supporting this for other 
> data types as well.

> Note: according to the book, double-byte character constants can't be 
> truncated, fixed-point constants can't be truncated if it will result in 

> data loss, and floating-point constants are rounded.

> Is there a way to achieve what I want using existing HLASM R6 options? 
> If not, is a requirement already on the books?

> -- 
> Edward E Jaffe


----------------------------------------- The information contained in this 
communication (including any attachments hereto) is confidential and is 
intended solely for the personal and confidential use of the individual or 
entity to whom it is addressed. The information may also constitute a legally 
privileged confidential communication. If the reader of this message is not the 
intended recipient or an agent responsible for delivering it to the intended 
recipient, you are hereby notified that you have received this communication in 
error and that any review, dissemination, copying, or unauthorized use of this 
information, or the taking of any action in reliance on the contents of this 
information is strictly prohibited. If you have received this communication in 
error, please notify us immediately by e-mail, and delete the original message. 
Thank you

Reply via email to