Here’s one to change a 6,0 numeric date in MMDDYY form to 7,0 numeric date in CYYMMDD form. INTERAL_DATE is the 7,0 CYYMMDD date. EXTERNAL_DATE is the 6,0 MMDDYY date.

...
Read More

The RPG Logic Cycle  The RPG LOGIC CYCLE is the backbone of the old RPG programming language. It’s use has faded in recent years but it should still be known and understood by every modern RPG language Developer 😉 So, regardless of whether you want to code modern or *cough* old style…. Let’s see what

Read More

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 at least one greater than the page size. The ILE RPG program to

Read More

A copybook is a technique that us RPG PROGRAMMERS use to suck in piece of re-useable code without having to type it every time into lots of programs. A typical use of a copybook might be something like this scenario: Every program within an application uses the *LDA (Local Data Area) to store specific pieces

Read More

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 re-usability. Think of a copybook as

Read More

When IBM introduced RPG IV (RPGLE) back in the mid 90’s, most of the RPG III opcodes were converted into built in functions. This makes for more readable code and efficient programming. The built in functions each do a particular function just like any opcode would have done. Since the built in functions are provided

Read More

Conditional selection in RPGLE In RPGLE we have the following conditional opcodes available: The If-EndIf block The If – Else- EndIf block The If – ElseIf – Elseif – EndIf block The Select Block Let’s look at them one by one. The If-EndIf in RPGLE If we want some RPGLE Statement(s) to be executed conditionaly.

Read More

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 pulling hair out while staring at a green screen. RPG III was released with the System/38,

Read More

Honestly, I despair of the RPG monkeys that knock up code that’s as bad as some of the things I’m working on currently. I found a great term to describe what I’ve been doing of late: refactoring Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing

Read More

I’m a big fan of WDSC7 (Websphere Development Studio Client for Windows) for my RPG/CL/DDS/SQL/whatever coding when I’m using windows.. but there are a few others out there. I would love to use IBM’s RDi (Rational Developer for IBM i) but while IBM insist on charging around $900 for the program it puts it firmly

Read More

Tips to reduce static storage The variables in an ILE RPG module or program can be divided into three storage (memory) classes: static, automatic, and heap (or dynamic.) These classes determine how and when storage is allocated, used and freed. If a program uses a lot of static storage, and has many instances active at

Read More

I found this old email tucked away in a dark, damp corner of my old desktop. Covered in cobwebbs, sticky with splashes of Jolt Cola and sticky bits of snickers bars it raised a wry smile whgen I read it. A quick cut/paste later and here it is. I sent this to some of my AS400 team members when on site for a client in London. A big German bank who’s name rhymes with… erm… well it doesnt rhyme with anything actually.

Anyway, this was my first visit to the Annual News400 conference back in 2000. I had a fantastic time and was in full geek delight for the entire week:

 


 

So, I attended the News/400 International Conference in Vail, Colorado, last week.

...
Read More