So, as part of an IBM-i project to “rebuild a bunch of source libraries on the development machine” I always think about backups before touching things. Not because I have history of deleting things (while in rampant house keeping mode) and then regretting it later… we would never do that right? cough So, since I

Read More

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 😉

...
Read More

OVRDBF – Override Database File You can use the Override with Database file (OVRDBF) command to replace the database file named in a CL program or to change certain parameters of the existing database file. It can be overridden at a certain invocation level within the stack or set to be job wide. Secondary over-rides

Read More

Get the IBM i Operating System Version in IBM i CL There are lots of way of checking the operating system version on your IBM i Server. On your command line type DSPSFWRSC and with F11 you will see the Software Version of all the products installed on your iSeries. You could also use the

Read More

A few years ago, I found this great article that answered all my questions regarding how to send emails (in this case various CSV spreadsheets) from the AS400 and iSeries machines. I was just discussing it so even though this is 20 years old, why not stuff it in a blog entry: Send E-Mail Messages

Read More

Any program can easily find out the mode it is running in by calling an IBM supplied *API – which will return the status of the job we are running. Basically, we just have to teach our program to shout “Hey Dude – am I running in batch or what?” and then the dark lord

Read More

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.

...
Read More

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