Tag Archives for " #SQLRPGLE "


Update an IBM i file with SQL cursor using SQLRPGLE WHERE CURRENT OF

Using SQL in RPGLE programs is easier than you think. Making the move from RPG native file IO to SQL database IO is really quite straightforward.  Changing from good old READE loops to SQL FOR Loops simply means using the SQL CURSOR function. SQL has a groovy way of referring to what the stuff that […]

Continue reading

Replace IBM i Native File Access with SQL

I found this excellent article by Birgitta Hauser, Software and Database Engineer, Toolmaker Advanced Efficiency GmbH. It covers the basic concepts you will need to consider if you want to “Replace IBM i Native File Access with SQL” Just in case it vanishes I’m going to reproduce it here: If you are considering SQL and […]

Continue reading

Adopting Authority – Problems with SQL RPG Programs

RPG PROGRAM USER(*OWNER) – Adopts the object owner level of Authority Most IBM i Programmers are aware of the USER(*OWNER) compile setting — anyone calling this program will adopt the authority level of the program. So if a program is compiled by user QSECOFR and USER(*OWNER) then anyone calling that program will automatically be elevated […]

Continue reading

Speeding up SQLRPGLE using indexes instead of logicals

SQL is a wonderful beast for quickly getting data from huge tables (aka Files). The trouble with SQL is that it’s so very simple to use; programmers get lazy and sometimes forget to do the analysis to make it as simple and #FAST as possible! It’s easy to overlook performance tuning because SQL goes out […]

Continue reading

Example RPGLE web service program [SOAP]

Here is a quick little example RPGLE web service – it’s written in RPG, the SQLRPGLE flavor and simply reads a file (the System/21 Stockroom master file — INP20) and returns a multi-occurrence data structure (array) of the stockrooms that the user is authorized to use. #hopeithelpssomebody WEBGETSTR – get all stockrooms for a company […]

Continue reading