• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Compiler Directives for RPG Programs and Modules

    November 13, 2002 Ted Holt

    Hey, Ted:

    I would like to define a standard set of H specs for my RPG source members so that all will compile with the same options. However, some RPG source members are compiled as modules and others are compiled as standalone programs. This means I can’t include the DFTACTGRP and ACTGRP keywords in the standard H specs because RPG doesn’t allow them when compiling modules. Do you have any tips that will help me solve the problem?

    — Tony

    In V5R1 IBM added some new predefined compiler conditions that will help you solve this problem. The new conditions are also available for V4R4 and V4R5 as PTF SF65716.

    • *ILERPG is defined if you are compiling from the iSeries RPG ILE compiler, but not defined if you are compiling with VisualAge RPG.
    • *CRTBNDRPG is defined if you are using the Create Bound RPG Program (CRTBNDRPG) command to compile the source member as a standalone program.
    • *CRTRPGMOD is defined if you are using the Create RPG Module (CRTRPGMOD) command to compile the source members into a module object.
    • *VxRxMx is defined if your compiler is at or above the release you indicate. The earliest release you may specify is V4R4M0. You can use this condition to include different code sections for different releases.

    I threw the following two source members together to address your situation. The first source member, HSPECS, contains compiler options:

     /if defined(*crtbndrpg)                      
    H dftactgrp(*no) actgrp(*new)                 
     /endif                                       
    H indent('| ') option(*srcstmt: *nodebugio)   
    

    I was able to compile the code in this source member with both CRTBNDRPG and CRTRPGMOD:

     /include qrpglesrc,hspecs
    D somevar         s              4a           
    C                   eval      somevar = 'ABCD'
     /if defined(*crtbndrpg)                      
    C                   eval      *inlr = *on     
     /endif                                       
    C                   return                    
    

    — Ted

    Sponsored By
    ASNA

    Why Viacom Outdoor Selected ASNA Visual RPG for Web Development

    Viacom Outdoor, tasked by the Mississauga city government with providing transit shelter cleaning and maintenance service, realized that their current reporting system was inconvenient and cumbersome for all parties involved (Viacom, subcontractor, city government officials). To reduce costs related with this process, Viacom decided that the best approach was to develop an on-line system that all parties could access. The resulting Web application allows subcontractors to submit, on-line, their activities and time spent for cleaning services to Viacom Outdoor. The new system is a great benefit to the subcontractor since it provides them with accurate, up-to-date information about what work to perform and it is helpful to Viacom Outdoor because all of the verification information is input directly into their iSeries database. Additionally, city officials can see the reports of these services in real-time via the same Web application at any time.

    “The best thing about AVR, from a management perspective, is the speed with which we are able to develop applications. The programmers, who already understood the business very well, were able to put to use their existing RPG skills and that was key to our choosing AVR. This Web application has been really beneficial to us. It’s not only easier for all parties involved to see the important information, but we are able to implement it with our existing equipment. The only cost to us was development time which is something that would have been incurred anyway.”
    — Milvi Salurand

    Download your FREE copy of ASNA Visual RPG today!
    http://www.asna.com/downloads.asp

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: 2002, mgo_rc, Number 87 -- November 13, Volume 2

    Sponsored by
    VISUAL LANSA 16 WEBINAR

    Trying to balance stability and agility in your IBM i environment?

    Join this webinar and explore Visual LANSA 16 – our enhanced professional low-code platform designed to help organizations running on IBM i evolve seamlessly for what’s next.

    🎙️VISUAL LANSA 16 WEBINAR

    Break Monolithic IBM i Applications and Unlock New Value

    Explore modernization without rewriting. Decouple monolithic applications and extend their value through integration with modern services, web frameworks, and cloud technologies.

    🗓️ July 10, 2025

    ⏰ 9 AM – 10 AM CDT (4 PM to 5 PM CEST)

    See the webinar schedule in your time zone

    Register to join the webinar now

    What to Expect

    • Get to know Visual LANSA 16, its core features, latest enhancements, and use cases
    • Understand how you can transition to a MACH-aligned architecture to enable faster innovation
    • Discover native REST APIs, WebView2 support, cloud-ready Azure licensing, and more to help transform and scale your IBM i applications

    Read more about V16 here.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Omitting Parameters in RPG Programs and Modules Reader Feedback and Insights: Indicators in RPG II Programs

    Leave a Reply Cancel reply

MGO Volume: 2 Issue: 87

This Issue Sponsored By

    Table of Contents

    • Reader Feedback and Insights: Modernizing RPG II Programs
    • Using Grep to Search Source Physical Files
    • Compiler Directives for RPG Programs and Modules

    Content archive

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

    Recent Posts

    • Liam Allan Shares What’s Coming Next With Code For IBM i
    • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
    • VS Code Will Be The Heart Of The Modern IBM i Platform
    • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
    • IBM i PTF Guide, Volume 27, Number 25
    • 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

    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