• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Service Program Catch-22

    June 26, 2002 Timothy Prickett Morgan

    Hey, Ted:

    We have stumbled upon a situation that we do not know how to resolve. We are trying to organize our RPG subprocedures by functional area. For example, all of our string-handling subprocedures go into one service program, while all of our date-handling subprocedures go into another. Other types of subprocedures go into other service programs.

    There are two service programs that reference each other. It’s as if a string-handling subprocedure uses a date-handling routine, while a date-handling routine uses a string-handling subprocedure. (That’s not the real situation, but I’ll use it as an illustration.)

    The problem is that we can’t create either subprocedure because it needs routines that are found in the other. Do we have to abandon our dreams of getting better organized?

    — Andy

    No, Andy, you don’t. It will just take a bit of extra work to create the service programs.

    Let’s assume you want to create a service program of string-handling routines and a service program of number-handling routines. The string-handling service program contains two subprocedures–STRINGA and STRINGB. The number-handling program contains two subprocedures–NUMA and NUMB. Further, STRINGA calls NUMB; NUMA calls STRINGB.

    First, create the modules. Next, create the service programs, specifying OPTION(*UNRSLVREF). This allows you to create the service programs, even though the system cannot link all the necessary subprocedures to their callers, as outlined in this example:

    CRTSRVPGM SRVPGM(MYLIB/MYSVNUM)  +
       MODULE(MYSVNUM) +
       EXPORT(*ALL) +
       OPTION(*UNRSLVREF)
    
    CRTSRVPGM SRVPGM(MYLIB/MYSVSTRING) +
       MODULE(MYSVSTRING) +
       EXPORT(*ALL) +
       OPTION(*UNRSLVREF)
    

    The subprocedures exist, but are not ready for use because of the unresolved references. If you try to use a subprocedure that has an unresolved import, the system issues message MCH3203.

    Now create the service programs without OPTION(*UNRSLVREF), as in this example:

    CRTSRVPGM SRVPGM(MYLIB/MYSVNUM) +
       MODULE(MYSVNUM) +
       EXPORT(*ALL) +
       BNDSRVPGM(MYSVSTRING)
    
    CRTSRVPGM SRVPGM(MYLIB/MYSVSTRING) +
       MODULE(MYSVSTRING) +
       EXPORT(*ALL) +
       BNDSRVPGM(MYSVNUM)
    

    — Ted

    Sponsored By
    RJS SOFTWARE SYSTEMS

    Save TIME AND MONEY with our AS/400-iSeries Report and Data Delivery Systems

    Delivering AS/400 reports via email, web, Lotus Notes, Domino or CD.

    Whether it’s Native AS/400 or PC-based, we have the solution.

    For a FREE FULLY FUNCTIONAL DEMO CD, please visit our Web site at www.rjssoftware.com.

    Contact us at 888-RJS-SOFT or email us at sales@rjssoft.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: mgo_rc, Volume 2, Number 49 -- June 26, 2002

    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

    Parameterized RUNSQLSTM Determining Whether a User Is Already Signed On, Take Three

    Leave a Reply Cancel reply

MGO Volume: 2 Issue: 49

This Issue Sponsored By

    Table of Contents

    • Searching Message Text
    • Connection Pooling with Tomcat
    • Service Program Catch-22

    Content archive

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

    Recent Posts

    • Meet The Next Gen Of IBMers Helping To Build IBM i
    • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
    • Will Independent IBM i Clouds Survive PowerVS?
    • Now, IBM Is Jacking Up Hardware Maintenance Prices
    • IBM i PTF Guide, Volume 27, Number 24
    • Big Blue Raises IBM i License Transfer Fees, Other Prices
    • Keep The IBM i Youth Movement Going With More Training, Better Tools
    • Remain Begins Migrating DevOps Tools To VS Code
    • IBM Readies LTO-10 Tape Drives And Libraries
    • IBM i PTF Guide, Volume 27, Number 23

    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 © 2025 IT Jungle