Problem solve Get help with specific problems with your technologies, process and projects.

What's the difference between the three types of subfiles as in the DDS?

What's the difference between the three types of subfiles in the DDS, as well as the difference in programming...

the three. Also, how is one more advantageous over the other with respect to the OS/400, as well as the program?

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


This was last published in December 2004

Dig Deeper on RPG iSeries programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.



  • How do I size a UPS unit?

    Your data center UPS sizing needs are dependent on a variety of factors. Develop configurations and determine the estimated UPS ...

  • How to enhance FTP server security

    If you still use FTP servers in your organization, use IP address whitelists, login restrictions and data encryption -- and just ...

  • 3 ways to approach cloud bursting

    With different cloud bursting techniques and tools from Amazon, Zerto, VMware and Oracle, admins can bolster cloud connections ...