@ACScompass @IBM You guys are experts, right? Well, please tell your web master to replace “iSeries” and “AS/400” with #ibmi and we will believe you 🙂
– Torbjörn Appehl (@tappehl) (in reply to ACScompass)09:47 – Nov 15, 2022
@ACScompass @IBM You guys are experts, right? Well, please tell your web master to replace “iSeries” and “AS/400” with #ibmi and we will believe you 🙂
– Torbjörn Appehl (@tappehl) (in reply to ACScompass)09:47 – Nov 15, 2022
Most input and output functions are the same in free-format RPG IV as in fixed format, except for the location of the code within the source line
By Jim Martin
Editor’s Note: This article is excerpted from chapter 5 of Free-Format RPG IV: Third Edition, by Jim Martin.
Workstation I/O
To perform workstation input and output in free format, you use the same methods as in fixed format. The only difference is where you place the operation code and parameters in the free-format source statement.
Write/Read
The most common operation to a workstation device is the Exfmt (Write then read) operation. The write portion of this operation moves the data from the specified record to the buffer of the display device’s open data path. The device function manager checks the option indicators and performs the selected options, such as setting display attributes, displaying error messages, or performing keyword functions.
The read part of the Exfmt operation sends the output buffer to the device and then waits for input from the device. The input occurs when the user presses either Enter or an enabled function key. The operating system handles non-enabled function keys by returning a message informing the user that the key is not available.
Write
The Write operation usually is associated with a display file for which an overlay function is needed—for example, for a trailer record preceding a subfile control record or a message subfile record preceding a regular display format.
Read
We seldom use the Read operation in a display file. You can execute it immediately after a Write operation, but programmers usually use the Exfmt operation to perform this combination. Read is more commonly used when the specified file is an Intersystem Communications Facility (ICF) file.
ICF I/O
RPG IV supports ICF files by letting you specify device WORKSTN in the file declaration. The RPG operation codes that you specify dictate what the communications device will do. The file declaration includes a device name (Dev) keyword, which ICF requires. The value of this keyword corresponds to the device entry names in the ICF file.
An Exfmt operation to an ICF record becomes a three-function combination: send a record, send a “turnaround” instruction to the other station, and then receive a record from the other station. The Write operation is simply a send-record operation. The Read operation with a record format is a receive operation. If the Invite keyword (DDS in the ICF file) was used previously on a Write operation, a Read operation using the ICF file name becomes a read-from-invited-devices operation. In communications lingo, this means that any device in the device file (that has been invited) may now send to the program. With this kind of Read, you can specify a record wait time limit that, if reached, can cause control to return to the program along with a time-out exception.
Dsply
The Dsply operation is available in free format to provide the same functionality as its fixed-format counterpart. Because this operation comes from an original RPG format, you must remember to code the operation Dsply first, followed by Factor 1 information and then Factor 2 information.
Listing 5-6 shows examples of workstation I/O using free-format RPG IV.
Listing 5-6: Workstation I/O operations available in free format
Printer Output
In free-format RPG IV, you code printer output, whether program-described or externally described, the same way you do in fixed format.
Overflow Indicator
The overflow indicator has been with RPG for a long time. Indicators OA–OG and OV have served us well. In RPG IV, an externally described printer file can use any numeric indicator. As of V5R1, you can also use a named indicator.
This feature can make RPG IV programs that use printer files easier to read and maintain. The named or numbered indicator is automatically set to *On when printing occurs on or after the overflow line specified in the printer file definition. You can change the overflow line permanently by using the CHGPRTF (Change Printer File) CL command, or you can change it temporarily by using the OVRPRTF (Override with Printer File) command.
Write
The Write operation uses a record name defined in the printer file and causes all output for the record to be printed.
Except
You can use the Except operation with program-described printer files to print using output specifications. Program-described printing provides nearly all the functionality of externally described printing.
Listing 5-7 shows examples of printer output using free-format RPG IV.
Listing 5-7: Output operations in free format
More of Jim’s Free-Format RPG IV is coming soon in an upcoming issue of MC RPG Developer. Can’t wait? You can pick up Jim Martin’s book, Free-Format RPG IV: Third Edition at the MC Press Bookstore Today!
JW_DISQUS_VIEW_THE_DISCUSSION_THREAD
Jim Martin holds a BS degree in mathematics and an MS in computer science. For 26 years, he was employed by IBM, where he wrote RPG applications for customers and worked in the programming laboratory as a programmer on portions of CPF and the OS/400 operating system. After leaving IBM, Jim took post-graduate work in computer science and performed RPG training. He is an IBM-certified RPG IV developer and author of multiple bestselling editions of Free-Format RPG IV, which, since the book’s initial publication in 2005, have taught thousands of RPG IV programmers how to be successful with the free-format coding style.
MC Press books written by Jim Martin available now on the MC Press Bookstore.
Created: 2022-10-03 18:01:56
Category: RPG
Most input and output functions are the same in free-format RPG IV as in fixed format, except for th…
Created: 2022-07-01 18:01:56
Category: RPG
Programming Style Issues
By Jim Martin
Editor’s Note: This article is excerpted from chapter 4 of …
Created: 2022-05-31 18:01:56
Category: RPG
Free-Format Operation Codes
By Jim Martin
Editor’s Note: This article is excerpted from chapter 4 …
bigbluestuff (@bigbluestuff) retweeted:
See our new brand in action!
HelpSystems is now Fortra, the positive changemaker in cybersecurity. #wearefortra pic.twitter.com/wNWStVMgFI
– Fortra (@fortraofficial)10:30 – Nov 14, 2022
November 16, 2022
Alex Woodie
If you run your IBM i workloads in the IBM Cloud, there is a new data replication offering available that could help you recover more quickly from a disaster. Dubbed Global Replication Services (GRS), the offering is only available for Power Systems Virtual Server customers running in two IBM data centers at the moment. But IBM says GRS could eventually be used with on-prem Power and FlashSystem deployments, too.
GRS, which IBM introduced in a September 22 blog post, provides asynchronous data replication for IBM i, AIX, and Linux data, as well as failover and failback mechanisms. The offering was designed to replicate a customer’s PowerVS storage volume from one IBM data center to a geographically distant IBM data center, as part of a replicated pair.
GRS is based in part on the data replication mechanism used in IBM’s Spectrum Virtualize, the software for managing IBM FlashSystem SAN arrays (and before that, the Storwize arrays), according to Tom Mathews, a distinguished engineer from IBM’s Austin lab who has worked on GRS.
“For very long time we’ve had global replication capabilities on-prem between two controllers,” Mathews tells IT Jungle. “It’s very similar. The magic here, though, was getting this to work in a multi-tenant” environment.
Multi-tenancy is important because it guarantees customers a level of storage isolation when running in IBM Cloud, Mathews says. In an on-prem Spectrum Virtualize environment, there wasn’t as much of a need for customers to conduct security validation to ensure that the secondary system has access to data when failover and failback mechanisms are put into action, he says.
But such controls are necessary in a shared multi-tenant environment in the cloud, and it took a bit of work by IBM to make it work, Mathews says. IBM built GRS on PowerVS so that it works “just like” Spectrum Virtualize does on prem,” he says.
“PowerVS is fundamentally a multi-tenant solution,” Mathews says. “You can have – I’m just making names up – Coke and Pepsi on the same systems, both doing replication. That’s why it’s significant.”
This has been the top request by PowerVS customers, says Ming Christensen, a director of product management who works out of the Austin lab.
“Customers want it,” she says. “They’ve been doing single-tenant private cloud environments for many generations. They want this enterprise capability in Power Virtual Server in a multi-tenant environment.”
While GRS may get additional capabilities over time, it provides a complete DR solution at this point in time, Mathews says. “It’s a complete solution,” he says. “We really don’t have any follow on work to do right now, except for maybe polishing a few things that we discovered late at the end. But you don’t have any extensive enhancements that we have planned.”
IBM says customers can wrap additional capabilities around GRS to provide a high availability solution. For example, since it’s a storage volume-based data replication system, it doesn’t know anything about IBM i objects, Mathews says. For application high availability, it would need to be paired with other software.
IBM is encouraging its customers to tape Technology Services (formerly Lab Services) and its business partners to build additional capabilities around GRS.
“That’s why we bring various capabilities to inject into the solution, inject into the products, so the customer can have an end-to-end solution,” Christensen says. “They can do it themselves, or work with our services or their preferred partner to put all these solutions together. And I think next year we’ll work on more . . . of an end-to-end solution.”
Currently, only two IBM Cloud data centers are supported with GRS, including DAL1 3, which is based in Dallas, Texas, and WDCO 4, which is based in Washington D.C. IBM plans on bringing GRS to more IBM Cloud data centers over time, Mathews says.
IBM recognizes that customers want to run in multiple architectures, including hybrid cloud setups that utilize servers and storage in on-prem and cloud data centers. IBM is working to accommodate those customers with GRS, but there are challenges, Mathews says.
“That’s a bit problematic because we don’t have control of their . . . storage,” he says. “We have to have complete control of the storage to do this safely and reliably, including the storage and the security elements around this storage and so forth.”
IBM is currently working to deliver cloud-native PowerVS in private cloud environments, via its Power Private Cloud as a service offering. GRS could potentially be included in that, Mathews says. “That’s something that we’re working on,” he says. “It’s not something we have right now.”
Big Blue Taps FalconStor To Move Data To PowerVS Cloud And Protect It
November 16, 2022
Alex Woodie
Kevin Beasley hasn’t added “security” to his title yet at VAI, the Long Island-based IBM i ERP software and services provider. But the longtime CIO may just yet, considering all the security activities he’s overseeing for VAI’s on-prem and cloud customers alike.
“We’re constantly looking at new things,” Beasley tells IT Jungle. “Obviously, the security landscape out there is phenomenally dangerous. There was a local government attacked here, and we’re constantly working on security.”
The top threat at the moment is ransomware, which is typically perpetrated through email or text phishing schemes. Nearly a dozen VAI customers have been hit by ransomware in just the past 18 months, Beasley says. While none of the recent attacks breached the IBM i server at the heart of an S2K deployment, they did compromise some of the outer layers of the companies’ security apparatus.
The message is getting out, Beasley says. Security is a big deal, and customers are taking notice. That’s a good thing.
“As recently as a couple of years ago, during the big attacks like Colonial Pipeline, a lot of customers, especially SMBs [small the midsize businesses] said, ‘Ah I don’t have to worry about that type of problem. They’re only going after the big guys,’” Beasley says. “Well, they go after everybody’s nowadays. Big, small it doesn’t matter. Lately, they’ve been targeting governments.”
VAI has always taken security seriously. Some IBM i ERP software vendors are bit lackadaisical when it comes to IBM i configurations, but you won’t find VAI users operating under powerful user profiles like QSECOFR or working with ALLOBJ security.
“Obviously we encourage people to move away from certain protocols, like SMB [Server Message Block], or at least have something that’s going to do some inline scanning of things like that,” Beasley says. “In our applications we offer a replacement option for customers who don’t want to do mapped drives and file shares. It’s an application we wrote that would replace it. It still can be launched from the IFS, but it’s being launched through a Web browser and through security settings, with various different levels of authentication.”
Having a good software architecture running atop IBM i – one of the most hardened operating systems around – can give IBM i shops piece of mind. When the security administrator locks down the rest of the platform – which is something that VAI does for its cloud customers and which it recommends that on-prem customers do for themselves – it can present a very resilient defense.
“IBM i stands up pretty good,” Beasley says. “You still have to make sure you have your security set correctly. Many times in the IBM i world . . . if it’s not completely public facing, you have to worry more about internal security, whether you’re going to get hit with ransomware, and do you have everything in your authorities correctly set and so forth.”
While the IBM i side of the house is mostly under control from a security perspective, it’s the other components that worry Beasley. It’s ensuring the network edge is sufficiently protected, that you’re on top of new vulnerabilities, that you’re applying patches, that the Web application firewalls are updated and functioning, that you’re looking for spoofing and any traffic that could be impersonating you.
But it’s been forced to up its game in response to the situation on the ground. Considering the threat that phishing poses to potential ransomware attacks, user training is a big deal. VAI conducts training sessions every couple of months to help educate its customers on how to avoid. Even so, ransomware attacks are still successful. “It happens all the time,” Beasley says. “You just don’t hear people talking about it.”
VAI already conducts periodic system audits and has contracts with penetration testing provider to check the security of its systems. Those provide a good point-in-time reference for security, but Beasley wanted something that could work in a more real-time manner.
“It’s like when you’re doing a data backup. You’re backing up. It’s a point in time,” he says. “We’re looking at what’s going on out in the security world that is the security equivalent of continuous data protection, or high availability.”
To that end, VAI is now contracting with additional security professionals who can actively work to penetrate the system, in a “red team-blue team” type of configuration. The company has brought in some folks with high-level security experience, including former military, to help them take security to the next level. This gives Beasley and the VAI leadership team more confidence that they are doing everything they can to protect their clients’ valuable data.
“We wanted to . . . ensure that we’re secure [by] using red-team types tools that simulate what an attacker would really be looking for,” he says. “Not just a simple weakness. You can patch this, and we do patching and everything else. But sometimes, what a blue team might think is what’s being targeted might not be what our red team might be looking at.”
VAI has also contacted the Cybersecurity & Infrastructure Security Agency, a federal agency in the Department of Homeland Security. According to Beasley, CISA will assign a security advisor to work with American companies free of charge.
“Obviously they’re on top of everything,” he says. “But being in contact with them obviously and having an advisor that we can reach out to when we need to” has been beneficial.
The majority of new sales for VAI today are occurring in the cloud. Part of the reason for that is doesn’t require the customer to have as many technical skills, which for an IBM i software developer, is a good thing. But the other part of the cloud equation is that it actually provides a more secure environment, Beasley says.
Security Alert: The Anti-Alfred E. Newman Effect