• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Guru: How Do You Do That With RDi? Part 3: Complex Compiles

    June 19, 2017 Susan Gantner

    In an earlier tip I tried to convince RDi users to give up compiling in PDM because the RDi compile interface has the time-saving Error List to offer. I offered some tips that help me with my compiles in RDi. Here I’ll continue my “Compile in RDi” campaign by offering some additional ideas for those who have more complex compile processes.

    There are two common issues I hear that keep people returning to PDM for their compiles. One is that their library lists aren’t set up correctly for the compile and the other is that they need to do something in addition to a simple compile command – typically some overrides or some other kind of pre- or post-compile steps. I’ll address both of those issues here.

    Library List

    Assuming you have taken my advice from my earlier compile tip to change the preference to turn off the default behavior to “Compile in batch,” it is easy to tell what library list will be used for your compiles. Simply expand “Library List” in the Remote Systems view. If you’d like some tips on how to temporarily modify the library list that you see there, refer to earlier Guru tips written by myself and by Ted Holt. You can change the default library list that your connection uses as I described several years ago in this tip.

    If for some reason you must use the “Compile in Batch” option, then you may want to check out the “Job description” setting on that same preference page to make sure the initial library list in the job description is what you need. In the Remote Systems pane, right-click on the appropriate system, and choose Properties. In the navigation pane of the Properties window, click on Subsystems. You will find the job description setting on the Commands tab in the contents pane.

    Pre- Or Post-compile Steps

    Some developers tell me they need to do something more complex than the standard IBM compile commands that appear as RDi Compile options. One of the most common requirements I’ve heard for this is that there is a need for one or more override commands to be issued prior to doing the compile. One simple way to deal with this requirement – assuming you are not compiling in batch with RDi – is to simply do the override command(s) (or call a CL program that does the override for you) using the command entry box at the bottom of the Commands Log view. Make sure you use the “Normal” option for the command to make sure it affects your currently connected RSE server job.

    There is a non-RDi-specific solution to the need for an override that works well in many cases, at least for RPG IV programs. Simply use the EXTDESC keyword in the F spec or Dcl-F in RPG. That way you can specify the file that will provide the compiler with the external description. After that, you can do away with any special handling for compile-time, whether compiling with RDi or PDM (which I hope you won’t be doing from now on).

    If you use a PDM user-defined option or perhaps just a CL program or command that you created to do your “special” steps, then you can create a customized compile option just as I described in my previous compile tip. In the last tip, however, our customized compile options simply provided special non-default values for parameters on the regular IBM compile commands. You can also create a customized compile option if you need to use your own command or program, but you need to know a small trick in order to get the primary benefit of compiling this way to work, i.e., getting your Error List feedback to work.

    Just as we did when customizing the IBM compile commands, you start the process by using “Work with Compile Commands…” from the Compile menu. Then choose “New Command” from the list of compile commands. Put in the name you want to use for this compile in the list in the Label box. Then put the name of your CL command into the command box, remembering that CALL is a perfectly good CL command if you haven’t created a CL command specifically for the process. Note when you do this that you can prompt the command if you want to make it easier to add parameters. If you need to pass parameters to your program, notice the “Insert variable…” button that allows you to use some of the same substitution variables that are commonly used with PDM user-defined options – such as &N for the name of the source member you are working with, &F for the source file name, &L for the library name, etc.

    Before you hit the “Create” button on your custom compile option, you need to add the “trick” to ensure any compile errors will appear in the RDi Error List. To do this, simply add a comment to your command which contains the keywords “*EVENTF” – or the more complete OPTION(*EVENTF) if you prefer – and “SRCMBR(&N)”. The figure below shows an example of the necessary comment. Including those two keywords in a comment in the command string provides RDi with the information it needs to retrieve the event file generated by the compiler. If you leave out the comment with the keywords, your compile option will work to compile the program, but it won’t be able to produce that helpful error feedback, which is the primary advantage of using RDi for compiles.

    I hope that I’ve now convinced at least some more of you RDi users out there who still use PDM for your compiles to give RDi’s compile and error feedback facilities a try. Looking at compile listings to find errors is just so 1990s. If you have a special situation so that the ordinary compile options don’t work for you, try creating your own RDi compile options. And remember that when using RDi for your compile, change the default parameter value on your compile command to specify “Output(*None)”. Then you won’t have the hassle of deleting all those compile listings that you’ll never need to look at again!

    RELATED STORIES

    How Do You Do That with RDi? Part 2: Compile

    Dealing With Library Lists In RSE/RDP

    Dealing With Library Lists In RDi

    Get Connected with Remote Systems Explorer

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: FHG, Four Hundred Guru, IBM i, PDM, RDi

    Sponsored by
    LaserVault

    Integrate Virtual Tape For Better Backups, Faster Recovery, And More Flexibility

    Virtual tape and virtual tape libraries offer a way to both simplify and strengthen backup and recovery operations. By incorporating virtual tape technology, automation of backups becomes possible resulting in hundreds of hours saved annually for IT departments and personnel.

    LaserVault ViTL is a virtual tape and tape library solution developed specifically for use with IBM Power Systems (from AS/400 to iSeries to Power 9s). See a demo and get a $50 gift card.

    With ViTL you can:

    • Replace physical tape and tape libraries and associated delays
    • Automate backup operations, including the ability to purge or archive backups
    • Remotely manage your backups – no need to be onsite with your server
    • Save backups to a dedupe appliance and the cloud
    • Recover your data at lightspeed greatly improving your ability to recover from cyberattacks
    • And so much more

    “The ViTL tapeless solution has truly made my job easier. It has given me more confidence in our full system recovery ability – but at the same time I hope it is never needed.” IBM i Administrator at a financial services company

    Sign-up now to see a ViTL online demo and get a $50 Amazon e-gift card when the demo is complete as our way of saying thanks for your time. Plus when you sign-up you’ll receive a free facts comparison sheet on using virtual tape vs tape so you can compare the functionality for yourself.

    LaserVault.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Mad Dog 21/21: Nervous Nellies Will AI Replace ERP?

    4 thoughts on “Guru: How Do You Do That With RDi? Part 3: Complex Compiles”

    • Lloyd Bailey says:
      June 19, 2017 at 8:42 am

      Susan

      Thanks for the helpful tips. I attempted to create my first special RDi compile command for CRTSRVPGM. Here is the command string I used, “CRTSRVPGM SRVPGM(&L/&N) SRCFILE(&L/QSRVSRC) TEXT(&X) /* *EVENTF SRCMBR(&N) */”. When I ran a test of it, RDi gave no visual response indicating success or failure. How do you handle this command without needing to go back to PDM?

      Reply
    • Doug Bridwell says:
      June 19, 2017 at 10:14 am

      One solution that has worked well for me is Scott Klement’s Build tool: https://www.scottklement.com/build/ .
      It uses compile directives right in the source headings to add pre-compile commands, compile commands with parameters, and post-compile commands. All with PDM like substitution variables.
      You can add the build command as a custom compile command in RDi. Of course you can also add the build command as a PDM option and compile with it in PDM.
      I use the build command whenever I have non-standard compiles.
      It works great for external printer files which are almost always custom.
      Since the build directives are right in the source headings you know to use the build command. And it beats putting the compile options in the heading and manually retyping them.

      Reply
    • Rusty Gadberry says:
      June 21, 2017 at 10:53 am

      Our shop uses the RDi iSphere add-on. I has a command named STRPREPRC that does the same thing as Scott’s Build tool. Very easy to implement.

      Reply
    • Michael Quigley says:
      June 23, 2017 at 11:52 am

      There’s no need (and in fact no benefit) to checking the library list on a job description when compiling in batch. The default for the SBMJOB command is INLLIBL(*CURRENT). So unless you’ve changed the default or overriden it in the “SBMJOB additional parameters” preference, your library list in RSE must be correct whether or not you’ve got “Compile in batch” checked.

      Reply

    Leave a Reply Cancel reply

TFH Volume: 27 Issue: 41

This Issue Sponsored By

  • ProData Computer Services
  • BCD Software
  • HiT Software, Inc. a BackOffice Associates Company
  • WorksRight Software
  • T.L. Ashford

Table of Contents

  • Ought To Be Committed
  • Will AI Replace ERP?
  • Guru: How Do You Do That With RDi? Part 3: Complex Compiles
  • Mad Dog 21/21: Nervous Nellies
  • A Fresche Emphasis On Services

Content archive

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

Recent Posts

  • COMMON Set for First Annual Conference in Three Years
  • API Operations Management for Safe, Powerful, and High Performance APIs
  • What’s New in IBM i Services and Networking
  • Four Hundred Monitor, May 18
  • IBM i PTF Guide, Volume 24, Number 20
  • IBM i 7.3 TR12: The Non-TR Tech Refresh
  • IBM i Integration Elevates Operational Query and Analytics
  • Simplified IBM i Stack Bundling Ahead Of Subscription Pricing
  • More Price Hikes From IBM, Now For High End Storage
  • Big Blue Readies Power10 And IBM i 7.5 Training for Partners

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.