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

    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

    • IBM i Has a Future ‘If Kept Up To Date,’ IDC Says
    • When You Need Us, We Are Ready To Do Grunt Work
    • Generative AI: Coming to an ERP Near You
    • Four Hundred Monitor, March 22
    • IBM i PTF Guide, Volume 25, Number 12
    • Unattended IBM i Operations Continue Upward Climb
    • VS Code Is The Full Stack IDE For IBM i
    • Domino Runs on IBM i 7.5, But HCL Still Working on Power10
    • Four Hundred Monitor, March 6
    • IBM i PTF Guide, Volume 25, Number 11

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