23
Sat, Nov
1 New Articles

My Favorite IBM i 7.3 Enhancements for Developers

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

IBM has officially announced IBM i 7.3. Here are some additions that interest me.

 

It is that time again. IBM has lifted the veil on the new version of the IBM i operating system. IBM i 7.3 is full of enhancements of all sizes. There is certainly a lot to read up on, and I have not been able to kick the tires on some of these enhancements yet. I plan to do just that in the near future.

 

In the meantime, I thought I would point out the enhancements that, in my opinion, are useful or interesting to me as a developer. These features may help you make the case to your management to start planning your upgrade.

 

Limitless Free-Format RPG Support

This enhancement is not entirely new, but it ships with 7.3 and I have not written about it yet. The last piece is finally in place for RPG’s new full free-form syntax. By placing **FREE in the very first line of your  RPG source, your code will no longer be limited to columns 7 through 80. That’s right! Your code can begin in column 1 and continue to the maximum width of your source member. If your RPG source is stored in an IFS file instead of a traditional source file, there’s no limit for line length. With regard to using IFS files for RPG source, another enhancement makes this even more interesting, but we’ll get to that in a moment.

 

Another effect of the **FREE directive is that your source may contain only free-format code. There can be no mixing older syntax with new. I personally like this. I’m not a fan of mixing syntax in a program, but some may not agree with that sentiment. Regardless, it’s an important point to note.

 

New %SCAN Functionality

There are two new enhancements in this area. The first is the ability to specify the length of the string to be scanned. This situation has not come up often for me, but when it has I have used %SUBST() in conjunction with %SCAN() to achieve the desired result. Any time I can simplify my code, I’m on board. The length for the scan is specified as the fourth parameter of the built-in function (BIF).

 

position = %Scan( String_To_Search_In : String_To_Search_For : Start_Position : Length_To_Search );

 

The second is a new BIF, %SCANR(). This new function is like the %SCAN() function, but it searches from right to left. This is very useful when looking for the last occurrence of something in a string. Is it something I’ll use every day? No, but it will be handy when I do need it.

 

Improved Data Structure Support for File I/O

If you’re going to use record-level access for your file operations in RPG, I have always recommended using data structures for those I/O operations for many reasons. The part that was always overly complicated, in my opinion, was the need to use different data structures for input and output operations. There may be times when using separate data structures is beneficial, but the developer shouldn’t be forced to use them.

 

This limitation was lifted for operations involving display files some time ago and has now been lifted for all files. In order to use the same externally defined data structure for input and output operations, it should be defined as follows:

 

Dcl-DS MyDataStructure ExtName(‘MYFILE’ : *ALL);

 

It seems if you create your data structure using the LIKEREC keyword, the compiler will default to using the *ALL format if the input and output buffers match.

 

Easier Use of ALIAS Keyword on Files

We have had the ability to use longer field names from files in RPG for a little while now. The ALIAS keyword was one of my favorite additions to the language in recent years. If the database supports field names longer than 10 characters, so should the system’s primary programming language! The only caveat to using the ALIAS keyword was that you had to use data structures for all file I/O. This wasn’t an issue for me, as I used data structures for I/O anyway. For others, this wasn’t the case.

 

With the latest enhancements for RPG, you can specify the ALIAS keyword on a file and it will use the longer field names, if defined, without the use of data structures for file I/O. This enhancement eliminates the only barrier to using ALIAS in your programs. Give it try. Future developers will thank you for it.

 

More Open-Source Technologies

As a developer, you should be paying attention to IBM’s trend of adding open-source tools to the IBM i operating system. The following is a partial list of open-source tools available to developers as of the latest release.

  • Node.js—Node.js provides an environment for running JavaScript code on the server instead of in the browser. This project is gaining popularity in the development world as JavaScript is one of the most commonly known programming languages in use. The idea of having the same programming language on the server side and in the browser is very attractive to many developers.
  • Python—IBM i now has both Python 2.7 and Python 3.0 available. I am no Python expert, but my understanding is that there are many differences in these two versions of Python, and the Python community is divided on which version is best. Having both versions gives us flexibility in the open-source projects we can bring to IBM i.
  • Git—Git is a source-control management tool commonly used in the open-source world. It can track changes to code, merge changes from multiple developers, and manage code versions. It’s not platform- or programming language-specific. I mentioned earlier that the removal of source-length limits for RPG source in IFS files was particularly interesting. Git can be used to manage the IFS-based RPG source files! I’ll do an article on this subject in the near future as I believe it could be very interesting to smaller shops with no source control products.
  • Orion—Orion is a web-based IDE used for developing in Node.js, Python, and other open-source languages. I even see that IBM has added an RPG syntax verifier to the shipped version. That’s very cool! I haven’t tried it yet, but it’s likely a step up from SEU when maintaining RPG code. My understanding is that your RPG source will need to be stored in IFS files, but it could be a real option for shops that are still not willing to spend the money for RDi. Orion will obviously not be as feature-rich as RDi, but it could have its uses in certain situations.

 

DB2 Enhancements

There were numerous enhancements on the database side of IBM i in this release. I am not fully versed in all these enhancements, but here’s one thing that piqued my interest.

 

DB2 temporal support will allow shops to run queries to see what their data looked like at a point in history. So you can get an answer to questions like, “What were our on-hand inventory and open orders for item X at this time last year?” Sure, you could build a program to try to calculate that, but wouldn’t it be easier to just run a simple SQL statement to get the answer?

 

This particular enhancement won’t be useful immediately. You need to set up your table as a temporal table. You should be able to do this using ALTER TABLE, and the table will start tracking history from that point forward. So it could take months or years before the benefits are fully realized. Also, you’ll have increased disk requirements for tables set up this way. There will be the actual table plus a history table with all previous versions of the rows of that table. This could grow very rapidly for frequently changed data, so keep a close eye on disk usage when setting this up for the first time.

 

Editor’s note: IBM’s Scott Forstie will reveal all DB2 for i enhancements in a series of TechTips, starting with this one.

 

That’s All for Now

That does it for my initial overview of the new announcement from a developer’s point of view. There’s of course much more in the release, but I couldn’t possibly cover it all in this article. I hope that my observations are helpful to you in your adoption of IBM i 7.3. This release will likely keep me busy with content for future articles for a few months. If there are enhancements that you think I missed, please put them in the comments. I enjoy discussing content with my readers and will take your input into consideration when planning future articles. It looks like we all have some reading and experimenting to do. Let’s get started!

Brian May

Brian May, an IBM Power Systems Champion and Solutions Architect for Profound Logic Software, devotes the majority of his time to assisting customers with their modernization efforts. He frequently writes and speaks on topics related to RPG, JavaScript, and IBM i Modernization. Brian recently contributed his time and expertise to the new IBM i Modernization Redbook.

 

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: