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

This course describes how to define and work with the more complex data types that RPG supports.

The course begins by describing how to define and work with variable-length data items. Arrays are covered next. You will see how to define, initialize, modify, search, and sort an array. The course then describes how to load a compile-time array by including the array data at the end of the source module. RPG tables are discussed next. As you will see, tables are defined and processed differently than arrays. The course ends by describing array data structures and multiple-occurrence data structures. You will see how to define each and how to reference the data that they contain.

Approximate Study Time: 90 minutes

Objectives

After completing this course, you should be able to:

  • Define variable-length data items
  • Code an RPG program that uses variable-length data items
  • Define an array and a table
  • Define and load a compile-time array or table
  • Code an RPG program that processes an array or table
  • Define an array data structure and a multiple-occurrence data structure
  • Code an RPG program that processes an array data structure or a multiple-occurrence data structure

Topic Outline

Using Variable-Length Data Items

Using Arrays

Using Compile-Time Arrays

Using Tables

Array and Multiple-Occurrence Data Structures

Audience

This course is intended for programmers new to the RPG programming language. It can also be taken by RPG III programmers who want to learn RPG IV and by RPG IV programmers who want to learn the free-form syntax.

Prerequisites

This course assumes that you are familiar with computer programming concepts. In order to satisfy this prerequisite, you should have some programming experience with another programming language.

This course also assumes that you have a working knowledge of basic IBM i concepts and facilities. You can satisfy this prerequisite by successfully completing the courses in the following series:

In addition, the course also assumes you familiar with IBM i programming concepts and facilities. You can satisfy this prerequisite by successfully completing the courses in the following series:

Finally, the course assumes that you have a basic understanding of free-form RPG programming concepts. You can satisfy this prerequisite by successfully completing the previous courses in this series: