What is RPG?

  1. Control options section
  2. Declarations section
  3. Main procedures section
  1. Read (Read Sequentially), Define as Usage(*Input), an input operation that instructs the computer to retrieve the next sequential record from the named input file — in this case, your Customers file
  2. Dow (Do While), Enddo, the Dow operation establishes a loop in RPG. An Enddo operation signals the end of the loop. Every Dow operation requires a corresponding Enddo operation to close the loop.
  3. If, If the ‘If’ operation is true, all the calculations between the If and its associated Endif operation are executed. Endif operation marks the end of an If operation’s scope.
  4. Write (Write a Record) directs the program to output a record to an output file.
  5. Eval (Evaluate Expression) assigns a value to a variable, for example; Eval Endofpage = *Off assigns the value *Off to the overflow indicator Endofpage
  6. Return (Return to Caller) returns control to the program that called it — either the computer’s operating system or perhaps another program. Return clearly signals the endpoint of your program and lets the program become part of an application system of called programs.
  • Header (Control) specifications — provide default options for the source
  • File specifications — identify the files a program is to use
  • Definition specifications — define variables and other data items the program is to use
  • Input specifications — depict the record layout for program-described input files 40 Programming in ILE RPG
  • Calculation specifications — detail the procedure the program is to perform
  • Output specifications — describe the program output (results)
  • Procedure boundary specifications — segment the source into units of work, called procedures

new to code!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Changing the Daily Standup to Deliver Results

Deploying on Kubernetes #9: Exposition via service

Convert Multiple Line Python Code To a Single Line in 3 Seconds

Introduction to Kubernetes

Big Data — Hadoop

AWS Cost Explorer Alternative with QuickSight

What even is DevOps?

AEM : Dispatcher Module on Docker

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ayla Dillis

Ayla Dillis

new to code!

More from Medium

Students! Want the attention of employers?

With Holocaust rhetoric, Greene creates new test for McCarthy

Monster of the Week: The Mothman

How I Learned to Let Go of Perfectionism: A Lesson From My Mother’s Suicide