Manta alt

YOUR IBM i TRAINING SOURCE

You must allow the browser to execute JavaScript programs if you want to view product information. If your browser is set up to execute JavaScript programs, the problem is that the product ID was incorrect. Use the menu bar above to find the desired product.

Overview

Audio

RPG has undergone numerous enhancements during the last fifty years. A major theme of the enhancements has been to make the language easier to learn and code. The most recent changes, called free-form RPG, continue this trend. In a nutshell, free-form RPG removes the strict column requirements for most RPG statements. As with many newer languages, statements can span multiple lines and begin in any column. In addition to making the language easier to use by existing RPG programmers, the enhancements make it possible for programmers with experience in other languages to become productive more readily, especially when performing maintenance work.

This course begins with an overview of free-form RPG and how the enhancements continue a trend that has been going on for years. The coding details for free-form H, F, D, and P specs are then covered. You will see how to code the new statements and how they compare to those with which you are already familiar. The course ends with a discussion of the tools available to write programs using the new format and to convert existing programs to use the free-form statements.


Approximate Study Time: 2.5 hours

Objectives

After completing this course, you should be able to:

  • Describe the general rules for coding free-form RPG statements
  • Given an existing RPG IV statement, code the equivalent statement using free-form RPG
  • Given a description of a program's general requirements, code an H spec using free-form RPG
  • Given a description of a file to be used by a program, code the corresponding F spec using free-form RPG
  • Given a description of a stand-alone field, a named constant, and a data structure to be used by a program, code the corresponding D specs using free-form RPG
  • Given a description of a procedure to be used by a program, code the procedure's P spec, procedure interface, and prototype definition using free-form RPG
  • Describe the support for free-form RPG statements available in the Source-Entry Utility (SEU) and Rational Developer for i (RDi)
  • Identify software available to convert existing RPG programs to use free-form statements where possible

Topic Outline

Introduction to Free-Form RPG

Free-Form H Specs

Free-Form F Specs

Free-Form D Specs

Free-Form P Specs and Procedure Prototypes

Programming Tools

Audience

This course is intended for both experienced RPG programmers and those programmers who are new to the language.

Prerequisites

This course assumes that you have a working knowledge of basic IBM i concepts and facilities. It also assumes that you can write and compile RPG IV programs on an IBM i system. You can satisfy these prerequisites by successfully completing the courses in the following Manta series:

  • Introduction to the IBM i Environment
  • The IBM i Programming Environment
  • RPG Programming