24
Tue, Dec
0 New Articles

Practical RDi: Exploring RDi 9.6, Part 1

RPG
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Version 9.6 of RDi provides a wealth of enhancements and new features; this article introduces some powerful new editor functionality.

RDi is a fantastic tool for RPG development. Since its earliest days as WDSC (or however you choose to capitalize the acronym), the Eclipse-based development suite has been one of the premier productivity tools for IBM midrange developers. While the road has had a few bumpy little detours, each step along the journey has been better than the previous one, and version 9.6 is no exception.

Availability

By the time you read this, version 9.6 (and its contemporaneous initial fix pack, 9.6.0.1) will have been available for at least a couple of months, plenty of time for the kinks to get worked out of the delivery system. It wasn't entirely a bed of roses; many people reported problems with the various methods of product access. I can't corroborate the problems; as I usually do, I went with the tried and true method of downloading the entire thing locally and manually adding the images to my Installation Manager repository list. I've found this to be the best way to get and install the software.

While I personally find installing via Installation Manager to be the most foolproof method, if you're not familiar with IM, you may want something a bit more automated. IBM realizes this and even provides a web page with detailed instructions showing how to download the latest version of RDi as a trial version entirely from the web. For newcomers to RDi, this might be the easiest way to get started.

However you go about obtaining the software, though, you'll eventually have to get a license key (an activation kit in Rational parlance), and that means a trip through either Passport Advantage or Entitled Systems Support. This can definitely be a project. Make sure you talk to whoever gets your licensed OS media (if it's not you!); you'll need their credentials to get the activation kit.

A Look at Some of the Enhancements

If you're a first-time user of the Rational tooling, you may wonder about the next few paragraphs. In fact, when I describe some of the new RDi enhancements, you may think this is nothing different from what you've been used to with IDEs from other vendors. But in a way that's one of the real accomplishments of recent releases; between the new syntax for free-form RPG and the ever more industry-standard behavior of the editor, RDi is making RPG look like any other language, and to me, that's a good thing.

So let's get started, shall we? For me, the first standouts are the new annotations and the hover enhancements. Annotations are little icons in the left column of the editor pane that provide information, usually indicating something that needs to be done. The hover enhancements provide extra information when you hover your cursor over a symbol in the code.

The primary annotations center on unused variables and on errors. The unused variables annotation is a welcome addition to program cleanup efforts. One of my jobs is reviewing and modifying old vendor code that has a lot of generated definitions that aren't used. When RDi finds a variable that isn't referenced in the program, it annotates that variable like this:

Practical RDi: Exploring RDi 9.6, Part 1 - Figure 1 

Figure 1: The i in the left column indicates that more information exists.

The small blue letter i indicates that there's an informational message associated with this line of code. To find out more, just hover over the line as so:

Practical RDi: Exploring RDi 9.6, Part 1 - Figure 2 

Figure 2: Hovering over the i causes the detailed message to appear.

The system will tell you that the field "unused" is indeed not used. This may mean that you truly haven't used it (so you can delete it), or maybe you did reference it elsewhere but misspelled it. Either way, you are alerted to the condition before you try a compile.

The other annotation has to do with errors. If you have a syntax error in your program, the editor's reaction in previous versions of RDi was to add a bunch of ugly magenta lines to the source detailing the error. It definitely brought attention to the error, but it could also be a bit clunky. The new technique is cleaner and more in line with modern techniques. First, the error is annotated:

Practical RDi: Exploring RDi 9.6, Part 1 - Figure 3 

Figure 3: Syntax errors are shown with a different annotation.

The small red circle with a white X indicates an error. As with other annotations, hovering over that symbol brings up the error in detail:

Practical RDi: Exploring RDi 9.6, Part 1 - Figure 4 

Figure 4: Hovering over those errors works the same, showing the detailed message.

In this case, what I did was leave out a colon between two parameters, and as you've probably found, this usually creates multiple errors. The hover is able to show all of those errors. The text in the hover is what you would normally have seen inline in the source in previous versions. This behavior is available for both syntax errors and compiler errors.

The annotation is a good introduction to hover in general. As you can see, the tool is moving toward a visual interface that has less clutter but brings up more information as you hover over things. In keeping with this visual assistance, IBM has provided a number of hover enhancements for other components of your source code. To start with, variables provide their entire provenance. Figure 5 shows an example:

Practical RDi: Exploring RDi 9.6, Part 1 

Figure 5: Hovering over a variable shows its detailed definition.

This field happens to come from a display file. I like that it shows the external file, the record format ,and finally the field name. This really helps me keep track of exactly which data points I'm using at any point in the program.

Another hover enhancement comes when we hover over a call to a reference to a prototype. In this case, I have a prototype for the ILE function system. When I hover over a call to that prototype, I see the entire definition of that prototype pop up for review.

Practical RDi: Exploring RDi 9.6, Part 1

Figure 6: Hover over a reference to a prototype to get its definition.

In this particular case, the prototype is defined right in my function, which is good because it shows you that the hover box identifies not only the definition but also the immediately preceding comment. This is really important, especially when you have many prototypes and they're interspersed throughout your program or brought in via /COPY.

This also works on local procedures. You don't even need a prototype for those; simply hover over the definition.

030718PlutaFigure7 

Figure 7: Hovering over a call to an internal procedure brings up the definition the same way.

Hovering has a lot of great capabilities. I particularly like the fact that it brings in the comments along with the definition; this really makes comments more valuable and perhaps gives us more reason to create and maintain them.

A Preview of What's to Come

IBM packed a lot more functionality into this release, from simple things like space-saving UI changes (especially nice for those with smaller monitors) to completely new features. The latter includes "new to me" features like Code Coverage, a subject to which I hope to devote an entire article after I learn a little more. This really is a feature-filled release, and I can't wait to share more of it with you!

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: