• 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:

    • Share on Reddit (Opens in new window) Reddit
    • Share on Facebook (Opens in new window) Facebook
    • Share on LinkedIn (Opens in new window) LinkedIn
    • Share on X (Opens in new window) X
    • Email a link to a friend (Opens in new window) Email

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

    Sponsored by
    Maxava

    Migrate IBM i with Confidence

    Maxava Migrate LiveTM minimizes disruption with seamless transitions. Upgrading to Power11, or cloud hosted system, Maxava has you covered!

    MIGRATE NOW

    Share this:

    • Share on Reddit (Opens in new window) Reddit
    • Share on Facebook (Opens in new window) Facebook
    • Share on LinkedIn (Opens in new window) LinkedIn
    • Share on X (Opens in new window) X
    • Email a link to a friend (Opens in new window) Email

    Using Grep to Search Source Physical Files Reader Feedback and Insights: Indicators in RPG II Programs

    Leave a ReplyCancel 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

    • Big Blue Ships Bob 2.0 And Premium Package For IBM i
    • Your IBM i Jobs Don’t Live On An Island Anymore
    • FalconStor Creates Cloud Clean Room To Prove Backup Recoveries Work
    • Talking Git On IBM i With A Bunch Of IBM i Gits
    • IBM i PTF Guide, Volume 28, Number 22
    • More Power Systems Price Hikes, This Time They Are “Directional”
    • AI Is Not Just For Developers, It Is For Everyone At Your Company
    • Guru: Finding Data In The Forest – Exploring Three-Part Naming In SQL
    • Former IBMer’s New Book Puts The Midrange In The Spotlight
    • Have You Tried To Buy A Server Lately?

    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