SQL works very nicely on IBM i Servers — the added benefit is that we can access the database using SQL from other machines, access it using IBM SQL and also using Native (DB2) File IO. But, SQL has some features that native database IO does not support – huge long table names (aka “alternative

Read More

RUNSQLSTM – Run SQL Statement When you do the RUNSQLSTM to create your SQL Objects – Do not qualify library names but use the Turnover variables just like you would define PDM variables: ? RUNSQLSTM SRCFILE(“&SL”/”&SF” SRCMBR(“&SM”) COMMIT(*NONE) NAMING(*SYS) DFTRDBCOL(“&LI”) Turnover uses the DFTRDBCOL column “&LI” to populate the other *library* variables. DFTRDBCOL(NLITTEN) Most shops

Read More

Twenty years ago these are the kind of things you had to know to work on the old AS400 systems. I found these on an old dusty corner of my homeserver. Enjoy the trip down memory lane or to use old RPG lingo AS400NERD CABEQ ‘1’  START DATABASE FILES What are the different definition levels

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