|
Rather than go into a long and involved explanation here, I will point you to a number of articles on the subject by Kevin Vandever:
Back to Basics: Introduction to Subfiles: This is a basic introduction to subfiles in RPG, with an example of a LOAD ALL subfile.
Back to Basics -- Self-Extending Subfiles: This converts the LOAD ALL subfile to a SELF EXTENDING subfile.
Become the Master of Your Subfile Domain: This completes the trilogy with the page-at-a-time or single-page subfile.
Additional articles which will be of interest to anyone doing subfiles are:
Back to Basics: Multiple Subfiles on One Screen: This covers multiple LOAD ALL subfiles on a screen.
Back to Basics: Side-by-Side Subfiles: This covers 'side-by-side' subfiles (!)
Back to Basics: Modifying a Subfile: This shows how to let the user add and update database data from a subfile.
Back to Basics: Data Entry Subfiles: This article covers fast data entry using a subfile.
Empower Users with Embedded SQL: This combines embedded SQL with subfiles for a powerful enquiry program
All the articles have downloadable code for you to build on. My own advice is to stick with self-extending subfiles unless there is a good reason for going for one of the other techniques. Once you have your code perfect for the technique you will normally use, it is then just a matter of copying code and making slight alterations when you have a new subfile program to write. ==================================
MORE INFORMATION ON THIS TOPIC
==================================
The Best Web Links: tips, tutorials and more.
Visit the ITKnowledge Exchange and get answers to your developing questions fast.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
|