× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If I recall correctly:

Factor 1 was required on the 360.
Factor 1 was required on the 1130.
Factor 1 was requred on the system 3 through the 15D.

I believe that the change occurred with RPG3 on the 38 and was
back-propagated to the 34 and 36 versions.

I am that old.  As Jon will testify.

Richard Jackson

-----Original Message-----
From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On
Behalf Of D.BALE@handleman.com
Sent: Tuesday, January 02, 2001 1:31 PM
To: RPG400-L@midrange.com
Subject: RE: Clever UNIX/C Constructs


Guys, I'm really NOT THAT OLD, but I do recall having to modify an RPG (I?)
program on a mainframe back in the early- to mid- 80's, just after I started
on a S/34, and remember being surprised that the compiler flagged an error
on
an ADD statement because factor 1 was not specified.

Also, I'll have to check to see if I still have the textbooks, but I'm
pretty
sure factor 1 was not required for the ADD, SUB, MULT, DIV opcodes even in
RPG
1.5 on an IBM 1130 (yes, punch cards!) or in RPG-II on a S/3.

Dan Bale
IT - AS/400
Handleman Company
248-362-4400  Ext. 4952

-------------------------- Original Message --------------------------
     Doug, I'm pretty sure Factor 1 was optional in RPGII on the S36, as
     of '85 or so. I remember coding that way long before ever seeing
     RPGIII or RPG/400.

     Then again, I sometimes can't remember what I did yesterday, so my
     memory on this may be faulty.

     ED


______________________________ Reply Separator
_________________________________
Subject: Re: Clever UNIX/C Constructs
Author:  "Douglas Handy" <SMTP:dhandy1@bellsouth.net> at EXCHANGE
Date:    1/2/01 9:31 AM


David,

>I have always been fond of
>ADD 1 CYOORD
>
>That one has worked since 196x...

Actually, it didn't work in the '60s or even the '70s, and that is part of
the
point.  When I first started with RPG II in 1979, factor 1 was not optional,

thus you wrote:

      C           CYOORD    ADD  1         CYOORD

As I recall, it wasn't until after RPG III on the S/38 that factor 1 became
optional in RPG II -- it may have the last release or two on the S/34, or
more
likely one of the S/36 releases.

And I always *did* prefer to leave factor 1 blank when it matched the result

field.  Not so much because it was less typing (not a big deal), but because
it
was easier to read during maintenance -- you didn't have to examine the
field
names to make sure they matched.  RPG field names (At least then) tended to
be
somewhat cryptic, and it is/was all too easy to "read over" a single
character
difference.

So to me  RESULT += FACTOR2  *is* the equivalent of:

      C                     ADD  FACTOR2   RESULT

whereas RESULT = RESULT + FACTOR2 is the equivalent of the old:

     C           RESULT    ADD  FACTOR2   RESULT

I'd welcome this change, just as I did making factor 1 optional.  Not
because it
saves typing, but because it makes "reading" source easier during
maintenance.
I suspect this will be less of an issue as more programs have "real"
variable
names which are longer than 6 characters.  But OTOH, that may make one even
less
prone to pay close attention to when two variables names are extremely
similar
but not identical.

I wouldn't spend lots of my $100 for it, but then it didn't cost much
either...

Doug
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.