Tag Archives for " #snippet "

Jul 19

Toby’s RPG Snippet to Scan Replace is mental but sexy

AS400 , IBM i , iSeries , Programming , RPG

wantI was recently copied on an interoffice email from a fellow RPG chappie (he’s quite sharp actually despite his funny mockney accent).

Aforementioned Mockney-Coder was modifying a recent program, written by a legacy RPG3 programmer (these creatures are very rare to find in the wild and we have placed them on the endangered species list).

Amazingly, there are still a handful of RPG Programmers out there who still write in RPG3. RPG3 was upgraded to RPG400 in 1993(?) so if they havent upgraded to RPG400 yet then the chances of getting up to RPGLE and then to RPG/FREE are slim to none.

But Mockney-Coder is a diligent chap and he mentioned a neat little alternative piece of RPG/FREE code that could be used to replace the large subroutines and array handling code chunks needed to perform the same thing in the old fashioned and clunky column based RPG varieties. After all, Variety is the spice of life…

all names have been removed to protect the innocent 😉

More Waffle
Sep 13

RPG Evolution, Modernization and Refactoring – Step 4 of 4 – Setting RPG Free

IBM i , Programming , RPG , Webservice

Setting RPG Free Convert RPG from Column to free format So, if we take the code and actually upgrade it to be the current style of RPG/Free we can see all the mainline specs are now written in freeform code style and it looks yummy: h datfmt(*iso) timfmt(*iso) option(*nodebugio) debug //——————————————————————- // system name: fix […]

More Waffle
Nov 12

What is a physical and logical file in the AS400 Database

AS400 , iSeries , Programming

What is the IBM i Database?

IBM i has a database which stores data in files. These are called physical files.

The Physical file stores the actual data.

The data is written to a physical file in arrival sequence. This data can be accessed by RRN (relative record number) where the first entry on the file (also known as a table) is relative record number 1. ie: the first record in the file. The next record is RRN=2 then RRN3 and so on.

If you want to access the data using a sequence of something on the file (for example CUSTOMER sequence) then you would design and create a logical view of this physical file specifying that you want it sequenced by customer.

More Waffle
1 3 4 5