• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • ILE: Decisions, Decisions, Part 2

    August 10, 2011 Susan Gantner

    In an earlier tip, I explored questions I often hear about binding directories. In this tip, I’ll explore another commonly asked ILE question and give you my perspective.

    Question: How many service programs should I have and how big should they be?

    Answer: It depends.

    Don’t you hate that answer? But in this case, I do think it is completely application dependent. Often when I am asked this question, the emphasis seems to be related to performance. But I don’t think the decision on the “what” or “how much” to put into a service program should be made based purely on performance. These days, developer time is a far more valuable commodity than system performance. So organizing callable functions by some logic that makes them easier for developers to find and use is far more important than how they perform at run time. That said, for those of you who still have performance concerns, here are a few thoughts on the subject.

    First, a service program is activated in each user’s job all at once, not one procedure at a time. So that’s why it would be best to have more than one service program–at least assuming you have more than a handful of service program procedures. It is always best not to activate more code than is necessary. In other words, avoid activating lots of code that will never actually be used in that job.

    On the other hand, once the service program is activated, it typically stays around for a long time. In other words, it doesn’t need to be activated for each program or application that uses it, so you don’t pay the “cost” of activating a service program over and over in a job unless, of course, you keep reclaiming the activation group the code runs in.

    It may also be important to understand what “activation” of a service program (or for that matter, a program) entails. It does not mean that the code begins to run; no files are opened, for example, as part of the activation process. However, the static storage necessary to run the code is allocated in the user’s job. The more static storage the program or service program uses, the longer the activation time. This kind of begs the question: How much static storage do my service programs need?

    Assuming that–like most shops doing ILE–your service programs are made mostly of RPG subprocedure code vs. RPG code not surrounded by P specs, then the answer is that most likely your service programs use relatively little static storage. Since, by default anyway, local variables in a service program do not use static storage, shops that use mostly subprocedure code with local variables will have little static storage in their service programs. Global data in modules with subprocedures (including both globally defined files as well as global D specs) always use static storage. So if your service program procedures use a lot of global data, they will take a bit longer to activate.

    But far more important than activation time is the time it takes a developer to find a service program procedure to use in their code. Or, worse yet, the time they waste re-writing the code because it was too cumbersome to locate a function that already exists. somewhere.

    That’s why my answer to the original question is: It depends. It depends on what organization of the code works best for the developers who are the most likely consumers of the reusable code in the service programs. After all, the only reason to put code into service program at all is to make it easily reusable.

    For another perspective on this subject, take a look at words of wisdom from IBM‘s RPG architect, Barbara Morris, including advice on how to determine how much static storage your modules use.

    I’ll address other frequently asked ILE questions in future tips.

    Susan Gantner is half of Partner400, a consulting company focused on education on modern programming and database techniques and tools on the IBM i platform. She is also a founding partner in System i Developer, a consortium of System i educators and hosts of the RPG & DB2 Summit conferences. Susan was a programmer for corporations in Atlanta, Georgia, before joining IBM. During her IBM career, she worked in both the Rochester and Toronto labs, providing technical support and education for application developers. Susan left IBM in 1999 to devote more time to teaching and consulting. Together with Jon Paris, she now runs Partner400, and appears regularly at many technical conferences, including System i Developer’s RPG & DB2 Summit. Send your questions or comments for Susan to Ted Holt via the IT Jungle Contact page.

    RELATED STORIES

    ILE: Decisions, Decisions, Part 1

    How Many Modules Should Be in a Service Program?



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    WorksRight Software

    Do you need area code information?
    Do you need ZIP Code information?
    Do you need ZIP+4 information?
    Do you need city name information?
    Do you need county information?
    Do you need a nearest dealer locator system?

    We can HELP! We have affordable AS/400 software and data to do all of the above. Whether you need a simple city name retrieval system or a sophisticated CASS postal coding system, we have it for you!

    The ZIP/CITY system is based on 5-digit ZIP Codes. You can retrieve city names, state names, county names, area codes, time zones, latitude, longitude, and more just by knowing the ZIP Code. We supply information on all the latest area code changes. A nearest dealer locator function is also included. ZIP/CITY includes software, data, monthly updates, and unlimited support. The cost is $495 per year.

    PER/ZIP4 is a sophisticated CASS certified postal coding system for assigning ZIP Codes, ZIP+4, carrier route, and delivery point codes. PER/ZIP4 also provides county names and FIPS codes. PER/ZIP4 can be used interactively, in batch, and with callable programs. PER/ZIP4 includes software, data, monthly updates, and unlimited support. The cost is $3,900 for the first year, and $1,950 for renewal.

    Just call us and we’ll arrange for 30 days FREE use of either ZIP/CITY or PER/ZIP4.

    WorksRight Software, Inc.
    Phone: 601-856-8337
    Fax: 601-856-9432
    Email: software@worksright.com
    Website: www.worksright.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    PowerTech:  2011 Security Event of the Year. September 22–23 in Las Vegas. RVSP today!
    New Generation Software:  BI comes in many flavors. Get info and FREE ice cream!
    System i Developer:  Join the Gurus at the RPG & DB2 Summit in St. Louis, October 17-19

    IT Jungle Store Top Book Picks

    BACK IN STOCK: Easy Steps to Internet Programming for System i: List Price, $49.95

    The iSeries Express Web Implementer's Guide: List Price, $49.95
    The iSeries Pocket Database Guide: List Price, $59
    The iSeries Pocket SQL Guide: List Price, $59
    The iSeries Pocket WebFacing Primer: List Price, $39
    Migrating to WebSphere Express for iSeries: List Price, $49
    Getting Started with WebSphere Express for iSeries: List Price, $49
    The All-Everything Operating System: List Price, $35
    The Best Joomla! Tutorial Ever!: List Price, $19.95

    JD Edwards World Training Brought Back by JDEtips The IBM PC Turns 30

    Leave a Reply Cancel reply

Volume 11, Number 23 -- August 10, 2011
THIS ISSUE SPONSORED BY:

Bytware
SEQUEL Software
WorksRight Software

Table of Contents

  • Adobe Flash Builder for the iSeries Programmer, Part 1
  • ILE: Decisions, Decisions, Part 2
  • Admin Alert: An Alternate Way to Port Image Catalogs Between Systems: QFileSrv.400

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • The IBM i Power10 Upgrade Cycle Forecast Looks Favorable
  • White Hats Completely Dismantle Menu-Based Security
  • Cloud Software To Drive Enterprise Application Growth
  • How Do You Stay In Touch With The IBM i Community?
  • IBM i PTF Guide, Volume 25, Number 6
  • Security Still Top Concern, IBM i Marketplace Study Says
  • Bob Langieri Shares IBM i Career Trends Outlook for 2023
  • Kisco Brings Native SMS Messaging to IBM i
  • Four Hundred Monitor, February 1
  • 2023 IBM i Predictions, Part 4

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2022 IT Jungle

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.