I don't know what your point is.

There are uncountable ways to make errors in assembly language not
available to HLL coders.  HLASM is *not* a compiler.  One could be made,
with whatever features one thought desirable, including strong typing, and
whatever rules one liked in regards to string length.  As far as I know, no
one has thought it worth the effort.

But, there are techniques one can use to minimize greatly the chance for
these kind of errors.  The main one is to avoid explicit lengths and
explicit offsets.  Define all fields, and define them only once*.  Only
slightly advanced Computer Science tells you that.

In the original case, all would have been well if no explicit length had
been specified on the literal.  No other error he could have made is fixed
by specifying the length.  It merely adds another way to make an error
(which of course, he did).  In fact, the only reason I can see to specify
the length of a character literal is to get the free blank padding.  You
might also *want* truncation, but that's somewhat degenerate.

IN any case, I agree it would make sense for HLASM to warn about literal
truncation.  I do not agree that there is anything more it can do to keep
careless programmers from misusing MVC (not to mention all other SS
instructions).

sas

* Do as I say, not as I do...



On Sun, May 3, 2015 at 5:54 AM, Binyamin Dissen <bdis...@dissensoftware.com>
wrote:

>            MVC      short,=256c' '
>            MVC      longer,=256c' '
>            MVC      full,=256c' '
>
> SHORT    DS        CL5
> LONGER DS CL120
> FULL DS CL256
>
> On Sat, 2 May 2015 21:26:02 -0400 Steve Smith <sasd...@gmail.com> wrote:
>
> :>No change to mvc is needed.  The warning is for character constants with
> :>explicit length.
> :>On May 2, 2015 2:28 PM, "Mike Shaw" <quick...@gmail.com> wrote:
> :>
> :>> A good idea, but the HLASM should not warn on zero lengths coded in
> MVCs
> :>> that are EX targets:
> :>>
> :>> MOVIT     MVC   0(0,R1),=CL16'****************'                  >>
> :>> Executed <<
> :>>
> :>>
> :>> Mike Shaw
> :>> MVS/QuickRef Support Group
> :>> Chicago-Soft, Ltd.
> :>>
>
> --
> Binyamin Dissen <bdis...@dissensoftware.com>
> http://www.dissensoftware.com
>
> Director, Dissen Software, Bar & Grill - Israel
>
>
> Should you use the mailblocks package and expect a response from me,
> you should preauthorize the dissensoftware.com domain.
>
> I very rarely bother responding to challenge/response systems,
> especially those from irresponsible companies.
>



-- 
sas

Reply via email to