enskill.com iSeries Training Onsite classes
DVD training
Books
Online e-Learning
Home
Resources
Contact
(c)2002-2008

This page is powered by Blogger. Isn't yours? Bryan's RPG IV Journal

Binding Directory Organization

Q. I work in a shop where service programs and binding directories traditionally have a one-to-one relationship (that is, there is a binding directory for each service program). My preferred approach is service programs with functions related to a business area in a binding directory, then maybe two or three binding directories that cross business areas.

From this scheme it appears we would reduce the amount of time we spend managing our objects. Remembering that we try to keep the functions small, we should not create a lot of "code bloat"; should be able to avoid loading a lot of functionality that is not useful.

A. The advantages of a one-to-one relationship between a program and a binding directory:
  • All the pieces needed for the program are listed in one place.
  • Relatively easy to automate the binding process, especially if the binding directory is named the same as the program.
  • Accelerates binding process by eliminating unused binding entries.
Personally, I prefer the approach of having two or three binding directories:
  1. A general cross reference binding directory for those entries that cross applications
  2. An application-specific binding directory, for those entries that are reused only within an application
  3. An optional program-specific binding directory for those entries applicable only to a single program
Then on the binding command (CRTPGM or CRTSRVPGM) or in the RPG H-specs, I
specify the binding directories, starting with the most specific:

BNDDIR('program-bnddir':'application-bnddir':'xapp-bnddir')

Advantages:
  • Eliminates duplication among binding directory entries.
  • Common, well known, naming conventions can be used across many programs.
  • Relatively easy to manage and automate, especially if naming conventions are consistent.
  • Avoids need to create a binding directory for every program; program-specific directory is used only as necessary.
  • Avoids error of forgetting to list entries for a program.
The "code bloat" issue is really a non-issue. Remember that unused binding directory entries are never bound into a program or service program; the binder will simply skip the entry.


It is your responsibility to ensure procedures, techniques, and code used from this website are accurate and appropriate for your installation. No warranty or support is implied or expressed.
E-mail to Bryan Meyers
Privacy and Email Policy
 
AS/400®, eServer, i5/OS, IBM i, Integrated Language Environment®, iSeries, OS/400®, RPG/400®, System i5, VisualAge®, and WebSphere® are trademarks of IBM Corporation. Note: IBM® i is the operating system used by IBM's Power Systems and iSeries servers. This site might refer to these servers as System i, iSeries, or AS/400.
 

If you are having trouble navigating the menu at the top of this page, you may use the following scrollable site map instead:
 

Self-paced DVD Training
DVD: RPG IV for RPG Programmers
DVD: RPG IV Modules, Procedures, and Service Programs
 
In association with Amazon.com
Programming in RPG IV
Control Language Programming for IBM i
RPG IV Jump Start
Power Tips for RPG IV
VisualAge for RPG by Example
 
International visitors: click hereInternational visitors:
Click here!