|
In RPG, I can load keys and do READE.
I think that in COBOL I have to
- load keys,
- start
- perform read until EOF
- test the last record's keys to the desired keys checking
for a match
When the file has 5 keys, it gets pretty long and messy.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of John McKee
Sent: Thursday, April 18, 2013 10:36 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: why rpg and not cobol
READE jn COBOL is this:
START <your file> KEY EQUAL <key value>
MOVE 'N' TO EOF-SW.
READ <your file> AT END MOVE 'Y' TO EOF-SW.
PERFORM UNTIL EOF-SW = 'Y'
processing
READ <your file> AT END MOVE 'Y' TO EOF-SW.
END-PERFORM.
Inline PERFORM came out with COBOL-85.
The START positions the file to the first record matching the partial key.
The READ gets an end of file when the matching key records have all been
read.
John McKee
On Thu, Apr 18, 2013 at 9:58 AM, Stone, Joel <Joel.Stone@xxxxxxxxxx>
wrote:
OK so there were dozens of responses but no right answers :)three
The reason why RPG is the preferred language on iseries (and not COBOL):
follow the money!
IBM was bringing thousands of organizations into the IBM 360 computer age
back in the 1960s & 1970s, only to see them move to the "B.U.N.C.H."
years later - where they could run COBOL for less $.Lionel
(Burroughs, Univac, NCR, Control Data, or Honeywell)
IBM had a choice way back when.
Guide clients to purchase IBM hardware and develop in COBOL ... and then
the clients would be running a "commodity" platform where they could more
easily jump ship in a few years;
OR
Guide clients to RPG - where the client was then CAPTIVE since no other
machine had a serious RPG compiler.
It's the same marketing philosophy as Gillete razors, Apple OS, and
model trains. Give away the shaver and the client cant go elsewhere -they
HAVE to buy your razors/software/train-cars!lines
COBOL was governed by a standards organization and also the federal
government had their FIPS standards - so IBMs hands were tied regarding
COBOL. With RPG, IBM owned it all and they could do whatever they wanted
to keep RPG from becoming a commodity.
Simple as that.
RPG has HUGE advantages over COBOL on iseries. Mostly not due to the
language itself, but the fact that so many users have created so many
widgets that users share knowledge, experience, books, and even code.
But RPG on iseries does offer the following huge language benefits over
COBOL:
Functions: with RPG one can create their own functions. COBOL doesn't
offer this, which is 100 nails in its coffin.
READE: in RPG this is one line of code; in COBOL it can be dozens of
of messy code (load the keys, read the file until keys not =, then checklanguage.
the last record read for matching keys)
Note to people debating RPG vs COBOL: if you are in your 50's or 60's
that's OK - retirement is soon. If younger, RUN to learn another
I think it will be amazing how quickly they will both be a footnote inrpg400-l-bounces@xxxxxxxxxxxx]
history!
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:
On Behalf Of Dave--
Sent: Wednesday, April 10, 2013 12:47 PM
To: RPG programming on the IBM i / System i
Subject: why rpg and not cobol
Hi,
I would like to know why RPG is the principal language on the i. Has it
always been so since the days of the AS400 and beyond? Is it just an IBM
thing?
Thanks
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
________________________________________________________________________
This inbound email has been scanned for all viruses by the MessageLabs
SkyScan
service.
________________________________________________________________________
______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs
Skyscan service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
________________________________________________________________________
This inbound email has been scanned for all viruses by the MessageLabs
SkyScan
service.
________________________________________________________________________
______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs
Skyscan service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.