RPG

Finkpad's picture

iSeries RPG Editer straight from your laptop (AS400 SEU RPGLEAlternatives)

I've just stumbled across an open source RPG Source Editor thats built around a PC Editor called Eclipse - I've only ever used Eclipse for my very infrequent Java work so I'm very excited about this.

More details are at RPG NEXT GEN which looks very promising.

This site offers some resources for working with the programming language RPG (native on IBM System i). IMHO IBM has done a poor job so far providing the RPG programming community with any decent software development kit for RPG compared to the Java Development Kit offered by Sun to the java community. Some people might now argue that IBM has done a great job by providing WDSCi and EGL. But perhaps this is comparing apples with pears. Anyway ... where is the solution?

The RPG Logic Cycle

The logic cycle is the backbone of the RPG programming language. Perhaps it's use has faded in recent years but it can still be used as effectively in RPGLE as it could in RPG2.

Tthe first and last time the program goes through the cycle is slightly different from all the in-between cycle runs:

Before the first record is read the first time through the cycle, the program resolves any parameters passed to it, writes the records conditioned by the First Page (1P) indicator, does file and data initialization, and processes any heading or detail output operations. This may also include printing heading lines.

load all subfile has fixed size of 9999 records

What is a load all subfile

A load all subfile is one in which we generally specify the subfile size as 9999 in the record format itself. However, you may define the subfile size to be less than 9999 in the record format and still load all your subfile at a time. In that situation the records will not be placed at contiguous memory location.

So, conceptually a load all subfile is the one in which all records are loaded at one go before they are displayed. Also, they should occupy contiguous memory locations.

how to define an expanding size subfile in rpgle

 Expandable subfiles in RPGLE

An expandable subfile is one in which ideally one page of records are loaded at a time. Subsequent pages are added to the subfile as per the user demand.

In the expandable subfile the subfile size must be atleast one greater than the page size.

The ILE RPG program to process an expandable subfile has typically the following flow

Single Page Subfiles

 What are single page subfiles

A single page subfile is a subfile in the number of records loaded at a time is equal to the maximum number of records which can be displayed at a time. In other words in a single page subfile all loaded records are displayed at a time. We delete all previously loaded records from the subfile whenever we need to load the next page of the subfile.

Process an Editable subfile in ILE RPG IV (RPGLE, RPG-ILE)

 So far we have dealt with display only subfiles. Now we will learn the subfiles which can accept user input and process it.

Generally the following are the steps in which we can display and process an input capable subfile. The editable subfiles are very much similar to the display-only subfiles except the last two steps where these subfiles are read (USING READC Or CHAIN) and updated (Using UPDATE). The steps to process an editable subfile in RPG IV are as given below.

what is a subfile and how does it relate to rpg programming language

 Subfiles structure, Anatomy of a subfile

A subfile basically has two parts (Twor record Formats)

an introduction to coding subfiles in rpg

Free Tutorial on AS400 Subfiles in ILE RPG (RPG-IV)

After learning the basic concepts of ILE RPG IV an RPG programmer's next stop is Subfiles. AS/400 Subfiles should always be learnt after one has acquired basic skills of RPG IV. One should be able to understand the basic RPG IV concepts like Processing display files, Record Formats, Physical Files, Logical Files, How to interact with database files and finally how to process an interactive display file. 

Introduction to subfiles

Basically subfiles are display-file-concept. Whenever we have to display some tabular data we have two options

# Define as many required fields

Source Copybooks

What are RPG COPYBOOKS anyway?

Copybooks are a very simple way of reproducing the same code into many programs: a copybook is a source member containing a section of code that can be inserted/copied into any other source member at compilation time. The main idea behind RPG Copybooks is reusability.

Think of a copybook as a source member that contains a common re-usable code component that that you dont want to compile but want to include in the actual programs that use it at compile time.

RPGLE in a nutshell

RPG and the AS/400 platform have a long history.

When the System/3 was introduced in the 1970s, RPG was first released , the language evolved and RPG II use of the logic cycle was many programmers first experience of pullng hair out while staring at a green screen. RPG III was released with the System/38, which included the ability to work with a fully integrated database. In 1994, RPG IV was released, with it's ILE abilities. Now referred to as RPGLE the language is evolving with every release of i5/OS (the IBM operating system).

Visitor Locations

Locations of visitors to this page

Recent comments

Who's online

There are currently 0 users and 21 guests online.

's beers

Beers are visible to logged in users only

Syndicate content