Re: RPG Programming on Advanced 36
- From: "Michael Kennedy" <Info@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 20 Jun 2006 13:30:01 +0100
Sounds like you're using some S/36 mode...
I will probably need to copy an existing RPG program to use as a
starting point for a new program and do some programming. The programs
are very simple - just read in a file with some packed fields, then
writes them out not packed.
I see most files using the CATALOG command.
Catalog shows FILES and Libraries, etc - not "Programs".
Programs (Source, Compiled, OCL (=procedure commands), etc) are held INSIDE
Libraries, as "members" of that Library.
I think LISTLIBR will show you the contents of Libraries. And
FROMLIBR/TOLIBR will copy "members" within libraries.
But it sounds like RPG programs are kept as source members in a
library, and then whetever kind of compiled and linked output is put
into other file members? I need to understand better where RPG source
programs and output executables are kept and how to list them out.
A listing of all members in a Library will identify the TYPE of member - S
(Source), O (Object/Compiled/Runnable), P (Procedure - like BAT in the
DOW/Windows world), R (also source members).
So far, I used SEU to edit one line in an existing RPG program, and
recompiled it with the REPLACE option to it went whereever the original
went. And that worked.
When SEU closes down, it gives you the option to Compile the modified
program - because that's usually what's needed.
But what compiler option do you use to compile
it for the first time?
I think the command to compile a program is RPG (or maybe RPGC) - it's been
many many years since I typed that command!! A compilation will produce a
Listing, Cross-reference tables, etc, if requested.
Also, but do you insert a new line into the source program using SEU?
When SEU opens up a file, it assigns a temporary line-no to each
source-line, as shown on the left. Eg, 1.00, 2.00, 3.00. If SEU is in
Enter/Update mode, then, to insert a new line between 2.00 and 3.00, key any
line-no value between 2.01 to 2.99 (hint, use 2.50 !!), and SEU will open up
an empty line, using the same "line-format" as the previous line. Use CMD3
(I think) to change the suggested format to another line-layout.
- Mike
.
- References:
- RPG Programming on Advanced 36
- From: cfs
- RPG Programming on Advanced 36
- Prev by Date: RPG Programming on Advanced 36
- Next by Date: Converting TIMER from S36 to AS400
- Previous by thread: RPG Programming on Advanced 36
- Next by thread: Re: RPG Programming on Advanced 36
- Index(es):
Relevant Pages
|