RPG-ILE Examples

Tags:
AS/400
RPG ILE
Please tell me the best site for rpg-ile coding examples in a work atmosphere, not the single line examples like in the manuals. Thanks

Answer Wiki

Thanks. We'll let you know when a new response is added.

a good site that I have used in the past is CODE400.com

=======================================================

Perhaps you should actually review the manuals. For example, the V5R4 ILE RPG Programmers Guide contains chapter 20, an example of an interactive application. The table of contents lists the chapter:
<pre>
Chapter 20. Example of an
Interactive Application . . . . . . . . . .375
Database Physical File . . . . . . . . . .375
Main Menu Inquiry . . . . . . . . . . . . .376
MAINMENU: DDS for a Display Device File .376
CUSMAIN: RPG Source . . . . . . . . . . .378
File Maintenance . . . . . . . . . . . . .379
CUSMSTL1: DDS for a Logical File . . . .380
MNTMENU: DDS for a Display Device File .381
CUSMNT: RPG Source . . . . . . . . . . .383
Search by Zip Code . . . . . . . . . . . .390
CUSMSTL2: DDS for a Logical File . . . .391
SZIPMENU: DDS for a Display Device File .392
SCHZIP: RPG Source . . . . . . . . . . .394
Search and Inquiry by Name . . . . . . . .398</pre>
The complete source is included — database and display DDS as well as RPG. Other chapters show examples of all aspects of ILE RPG coding. Hardly “single line” examples.

This short proc was lifted from the example:<pre>
//****************************************************************
// SUBROUTINE – ProcessSubfile *
// PURPOSE – Process subfile and display it *
//****************************************************************
begsr ProcessSubfile;

// Keep looping while roll up key is pressed
dou not rollupKey;
// Do we have more information to add to subfile?
if not %eof(cusmstl2);
// Clear and fill subfile with customer data
exsr ClearSubfile;
exsr FillSubfile;
endif;

// Write out subfile and wait for response
write foot2;
exfmt subctl;
enddo;

endsr; // end of subroutine ProcessSubfile</pre>

That manual can be viewed on-line <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/books_web/c092507602.htm”>here</a> or <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/books/sc092507.pdf”>downloaded as a PDF</a>.

Perhaps the most famous manual is the <a href=”http://www.redbooks.ibm.com/abstracts/sg245402.html”>Who Knew You Could Do That with RPG IV? A Sorcerer’s Guide to System Access and More</a> Redbook. There isn’t much you’re likely to do beyond what you’ll find in there.

Tom

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following