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

Support MC Press Online

$

Book Reviews

Resource Center

  •  

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

  • 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

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