December 10, 2021

MC TNT Header dots fade with byline 2017 06 01 l r

Lead Article - Programming

Getting Started: Sections & a Sample of ILE RPG Programs

Part one addresses the introduction to the sections of an ILE RPG program. It also illustrates how to write a simple file read/write program by using a procedural approach, as well as how to include comments within your programs as documentation.

By Brian Meyers and Jim Buck

Editor's Note: This article is excerpted from chapter 2 of Programming in ILE RPG, Fifth Edition.

The Sections of an ILE RPG Program

ILE RPG programs consist of four main sections:

  • Control options section—provides default options for the program
  • Declarations section—identifies and defines the files, variables, and other data items a program is to use
  • Main procedure section—details the processes, calculations, and procedures the program is to perform
  • Subprocedure section—includes declarations and processes for optional distinct functions (subprocedures) of the RPG program that either the main procedure section or other subprocedures can execute once or many times
Featured White Paper

White Paper Download

   Profound Logic

 

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

Get your copy of this important guide today! Download your copy today!
Webcast Learning

   LANSA

 

Supply 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:

  • Low-Code facilitates the development of Supply Chain Collaborative Portals.
  • Value Chain integration enhances visibility, timeliness, and consistency.
  • New technologies help modernize and expand ERP and Legacy Platform support.

 

Watch Now.
Application Dev

Operating Systems

Database

Programming

Management & Career

System Administration

Featured News

IBM Launches New IBM Z and Cloud Modernization Center for Acceleration of Hybrid Cloud

- Industry's definitive portfolio for modernization of IBM Z-based enterprise applications and data

- Inaugural Center partners include Capgemini, Deloitte Consulting LLP, Episode Six, Fiorano Software, Fujitsu Limited, Software Business Unit, HEXANIKA, Illumio, Luxoft, a DXC Technology Company, MuleSoft, Pennant Technologies, Software AG, Suntec Business Solutions and Zafin.

By IBM Corporation

IBM today unveiled the IBM Z and Cloud Modernization Center, a digital front door to a vast array of tools, training, resources and ecosystem partners to help IBM Z clients accelerate the modernization of their applications, data and processes in an open hybrid cloud architecture.

Upcoming Events
MC Press Bookstore