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



On 18 July 2016 at 11:52, Marc Beaulac <mbeaulac67@xxxxxxxxxxx> wrote:
Recently my company wants me to learn RPG on Power 7.

I deeply agree that you should be learning current fully-free RPG.
There's a catch: what will you be working on? The point is not that I
would want you to be writing brand new RPG/38 style code, but I may
expect you to be able to understand it when you're looking at it.

That said, RPG is not rocket science. The things you'll need to
really understand when looking at older code:
The basic concept of the RPG cycle.
Indicators, including the level break indicators.
I/O that happens in the I and O-specifications (whether program
described or external).

Really old code will have detail and total time calculations and
output - this is a part of the RPG cycle that will take getting used
to.

In the old days, our 'Hello world' was a program that read 80 columns
from a card and printed those as an 80 column block on the printer.
Not coincidentally, this was called an 80-80 list. Then we'd add
overflow, headings, page numbers. Then we'd graduate to customer
listings where there was more than one field; we'd learn how to
position fields on the printed page. Then we'd move from single line
listings to multiple line listings:

NAME ADDRESS CITY STATE ZIP

NAME
ADDRESS 1
ADDRESS 2
CITY STATE ZIP

...learning about Fetch overflow and conditioning the output on an
indicator (don't print address line 2 if it's blank).

If I were hiring you, I'd probably do something similar in order to
get you minimally familiar with the way this old stuff works. Because
my system is loaded with programs from this era. That, and the act of
editing code, compiling it, finding the spooled file, working out why
it didn't compile, fixing, testing, tweaking - all of these steps are
a necessary part of your education. And working on programs that
produce listings can't hurt anything, so you can go to town without
worrying that you're going to inadvertently ding up the database.

Typically, those old listing programs (Aged Trial Balance, for
example) don't see a lot of maintenance. They sit in the library and
run, run, run. So you wouldn't need to have RPG Cycle super wizard
power to work on my system. I'll deal with the really creaky old
stuff. You'd help me with some of it, but I'd have you in the newer
section of the code base, mostly because that's where the work is
happening.

Newer code that uses display files; especially subfiles:
The concept of device independent I/O; especially the idea of the
'block I/O buffer' - a concept which unfortunately does not have an
official name (I/O buffer is so generic as to be unhelpful).
The interconnection of indicators in the RPG and in the DDS.
I/O that happens outside the cycle - EXFMT, EXCPT, etc.

Here, 'Hello world' starts with a simple, single format display file
and accompanying RPG program that does one EXFMT, SETON LR and done.
It' displays 'Hello world' and exits. From there, you add a loop (and
a CF key to get out of it!) Next, you go to two record formats: one
that asks your name, and the second to display it. Next, a load-all
subfile (I'd use the same 80-80 text file to start). Then change it
up to an expanding-page-at-a-time subfile where you load customer
addresses only when the PAGE keys are used.

This is way more than you need to hear right now, but my point is that
you could ask your boss to set you up with a library, one customer
file with say 100 records in it, a flat text file with a couple of
lines of text, and you could follow the above 'syllabus' for a week or
so, until you get used to the nomenclature, the tools, and the
workflow. For reference material, you'll want the RPG Reference, the
RPG Programmer's Guide, the DDS Reference, and the Application Display
Programming Guide.

Start at the Knowledge Center
http://www.ibm.com/support/knowledgecenter/ssw_ibm_i
Choose your version of the operating system.
Click the 5 line hamburger menu at the top left.
Programming > ILE Languages > RPG
Programming > DDS
Programming > Device > Application Display Programming
Programming > SQL


I totally get that you want to do some learning on your own. That's
hard. There are no RPG compilers for the PC, so there's no ecosystem
of RPG learners which is constantly refreshed by the next wave of
graduates. RPG is deeply tied to the operating system (IBM i) and
since most of us are doing a lot of heads down work, there aren't a
lot of us who can devote the hours it takes to create really useful
lectures.

There are people like Jon who teach RPG (among other things) for a
living. There are several user groups who bring in speakers; perhaps
there's one near you?

One final thought about learning on your own. Style. I myself am
devil may care when it comes to style. I happily mix RPG III style
I-specs with L1M1 and brand new fully free sub-procedures in the same
program. Most people are more... more specific in the way they want
their code base to look. If you were to learn in a vacuum - for
instance in a series of threads here - we may teach you some
magnificent state of the art code... that your boss might reject
because it's way beyond what he wants in the code base. That's not a
ding on your boss; it's a reality that this is how some shops are
organised. So your boss may want you to peep through existing
programs in order to get you accustomed to the style that's in use.
That's cool but it won't get you into the 'edit, compile, test, debug'
workflow very quickly, whereas an 80-80 list will.

Good luck and welcome to our corner of the woods!
--buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.