Hello World from RPG3 to RPG400 to RPGLE

  • Home
  • /
  • Blog
  • /
  • Hello World from RPG3 to RPG400 to RPGLE

March 14, 2024

What is an RPG language HELLO WORLD program?

A “Hello, World!” program is a simple computer program that outputs or displays the iconic phrase “Hello, World!” to a user. This humble program serves as a fundamental introduction to programming languages and illustrates their basic syntax. Let’s explore this tradition further:

The “Hello, World!” program typically accomplishes the following:

  • It outputs or displays the message “Hello, World!” to the screen (often the console).
  • It ignores any user input.

Why is it significant?

  • For beginners learning a new programming language, writing a “Hello, World!” program is often their first step.
  • It acts as a sanity check to ensure that the software intended to compile or run source code is correctly installed and operational.
  • The tradition of using this phrase as a test message dates back to the 1978 book “The C Programming Language” by Brian Kernighan and Dennis Ritchie1.
  • However, variations of this phrase have been used even earlier in other programming languages.

Here’s a classic example of a “Hello, World!” program in the IBM System38 RPG/3 language:

     C           'HELLO'   DSPLY
     C                     RETRN

Or the same program in the IBM AS400 RPG/400 language:

     C     'Hello World' DSPLY
     C                   RETURN

Or the same program in the modern IBM i free format RPG ILE language:

**free
dsply 'Hello World';
return;

I recently recorded a short series of videos coding these examples, trying to help any new, beginner, noob programmers out there. Don’t watch these if you are offended by random mutterings, stupid jokes, fat fingered typing, bad hair or silly coding examples:

RPG Programming for Beginners

RPG is the well known programming language on the IBM i platform. Earlier versions of RPG ran on the old AS/400 and iSeries machines in decades gone by… the beauty of RPG is that it is fully backwards compatible. Over the years RPG has evolved massively and now looks like a completely different language. Dive into this course to learn the basics, review old column based RPG, and modernize samples right up to modern RPGLE and SQLRPGLE code standards.

NickLitten


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits.

Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day.

Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Subscribe NOW
7-day free trial

Take This Course with ALL ACCESS

Unlock your Learning Potential with instant access to every course and all new courses as they are released.
 [ For Serious Software Developers only ]

Online Learning for IBM i Software Technology Professionals

“The more that you read, the more things you will know. The more that you learn, the more places you’ll go.” – Dr. Seuss

>