For me, the primary reason for coding CLC   =C'IOLQ',3(R6)    is that the
generated length of a byte instruction, unless it's explicitly coded, is
taken from the first operand. This instruction will compare (correctly, I
presume) four bytes of data because the first operand is four bytes long.

If the operands were simply reversed, the instruction would compare only
one byte of data.:  CLC   3(R6),=C'IOLQ'

So why not code   CLC   3(4,R6),=C'IOLQ'   ? For future maintenance, if it
were determined that the proper string to check for is =C'IOL' , then two
changes would be required: the literal string and the length value in the
first operand. Although it could be argued otherwise, I don't generally see
a good reason for redundantly carrying the same value in two places.

I don't think this is about natural language influence. It's just about
programming convention based on experience.

.
.
.
JO.Skip Robinson
Southern California Edison Company
SHARE MVS Program Co-Manager
626-302-7535 Office
323-715-0595 Mobile
[EMAIL PROTECTED]

IBM Mainframe Discussion List <[email protected]> wrote on 10/05/2005
07:06:22 AM:

> In a recent note, Gerhard Postpischil said:
>
> > Date:         Wed, 5 Oct 2005 08:59:02 -0400
> >
> >
> > I'm wondering about a few things, since this does not do what you said
> > you wanted. The code will change a job with any program name beginning
> > with IOLQ (e.g., IOLQTEST, IOLQFAKE). If this is your intent, it would
> > be easier to maintain as
> >                 CLC   =C'IOLQ',3(R6)
> >
> For some reason, it's very customary to code the variable on the
> left and the constant on the right.  (Does this arise from word
> order in English sentences?  Might it be otherwise for native
> speakers of other languages?)  I sometimes work with code by
> a colleague who prefers the opposite convention.  Cognitive
> dissonance.
>
<snip>
> -- gil

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