October 5, 2022

MC RPG Developer

Lead Article - Programming

TechTip: Printing from a CL Program (the PRTLN Command)

Generating a report from an IBM i CL program isn’t straightforward, because in CL there is no direct way to write to a spool file. This article provides the Print Line (PRTLN) command, which allows simple, direct printing from a CL or CLLE program, including page control and headings.

By Sam Lennon

Sometimes it's just convenient to print directly from CL, and that's where the PRTLN command is handy. The CL language wasn’t designed to create reports—report writing is a strength of RPG. You can, of course, create Query/400 or QMQRY objects and then call them from a CL program to produce a report, but then you have extra objects to manage.

Feature Article - Programming

Input/Output Using Free Format, Part 1

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.

Another difference is the use of alternatives for a key list used in database I/O for Chain, Set, and similar operations. The key list is replaced by an inline composite argument list or a key data structure and the %Kds built-in function on the I/O operation. Also, database update now features the %Fields built-in function option.

In this chapter, we look at the operations, options, and built-in functions now available for database I/O, as well as for workstation I/O and printer output. You will find that the free-format approach to input and output varies little from the extended Factor 2 calculation format.

White Papers

SB LANSA PPL 5650

Why Migrate When You Can Modernize?

Explore the main considerations you should be aware of before embarking on a (migration or modernization) project. Take a deeper dive into business motivations and factors that could potentially influence your decision to migrate or modernize your existing IT platform and its risks.

Download your copy today!

Element Break 210x14

Profound WP PPL newsletter logo 5562

Profound Logic Solution Guide

More 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 companyare not aligned with the current IT environment.

Get your copy of this important guide today!

Element Break 210x14

Webcast

Profound WC PPL newsletter logo v1

Node Webinar Series Pt. 1: The World of Node.js on IBM i

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.

Part 1 will teach you what Node.js is, why it's a great option for IBM i shops, and how to take advantage of the ecosystem surrounding Node.

In addition to background information, our Director of Product Development Scott Klement will demonstrate applications that take advantage of the Node Package Manager (npm).



watch now!

Element Break 210x14

LANSA Webcast

Low Code: A Digital Transformation of Supply Chain and Logistics

Learn how businesses leverage Low-Code to continue to deliver value through digital transformation. Discover how the power of Low-Code is helping many businesses evolve their supply chain, increase ROI, and achieve more tangible results.

Watch this webcast now.

Element Break 210x14

 

Trial Software

HelpSystems SC PPL newsletter logo

Easiest Way to Save Money? Stop Printing IBM i Reports

The 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.

Rerun another report? Never again. Try the Robot Report Management Solution FREE for 30 days.

Request your trial now!

Element Break 210x14

Cybra SC PPL newsletter logo v1

Comply in 5! Well, actually UNDER 5 minutes!!

TRY 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.

Request your trial now!

Element Break 210x14

Featured News

New IBM Study Finds Cybersecurity Incident Responders Have Strong Sense of Service as Threats Cross Over to Physical World

Sense of duty to protect others cited amongst the top reasons 77% of respondents entered Incident Response (IR)

Ransomware has exacerbated the psychological demands of IR for 81% of respondents

Majority of respondents have sought out mental health assistance due to their experiences responding to cyberattacks

By IBM Corporation

IBM Security today announced the results of a global survey that examines the critical role of cybersecurity incident responders at a time when the physical and digital worlds are increasingly converging. The study, released during National Cybersecurity Awareness Month, found that incident responders surveyed – the frontline responders to cyberattacks – are primarily driven by a strong sense of duty to protect others; a responsibility that's increasingly challenged by the surge of disruptive attacks, from the proliferation of ransomware attacks to the recent rise of wiper malware.

Upcoming Events
MC Press Bookstore