Just a quick summary of things I found useful about the Common Virtual conference.
Modernizing Applications – Getting the next Gen Devs able to maintain and develop on the IBM i with the programming language you’re used to.
RPG IV is a modern language that you could have a “new generation developer” program in. It’s similar to the structure of commonly used programming languages. The con is they have to learn a new language and pay for the RDi IDE as RPG is proprietary so no other IDE supports it. Its based on Eclipse which many people use but i prefer not to use as its very complex and not simple and intuitive as netbeans. I did like all the hooks that they have into the IBM i, but you can also get those via IBM Navigator for i. The pro is that your current development staff and new developers can work on the same code base and somewhat “future proofs” your ability to maintain and update your programs.
To upgrade your non-RPG4 programs you can use tools such as Arcard, and Linoma RPG Toolbox. These tools will convert the source to RPG4. Also you can use Arcad Observer and Fresche xAnalysis to help with modernizing.
There’s also an alternative approach where you develop new projects in SQL and PHP. This allows you to use many things that have been developed on LAMP (Linux Apache MySQL, PHP) onto your iADP (IBMi, Apache, DB2, PHP) stack. Thanks to the open source community and PHP’s 20 years of history. This is what I’ve been doing.
Creating SQL Stored procedures
- To denote a passed in Parameter you can use “P_” such as P_NAME
- You can break free of system naming (DSPMSG) and use full names (i.e. CREATE PROCEDURE DISPLAY_MESSAGE)
- IBM provides the following tables to find information about your stored procedures
- QSYS2/SYSROUTINE – List of Stored procedures
- QSYS2/SYSPARMS – List of parameters to the stored procedures
- QSYS2/SYSRTNDEP – Dependencies of a stored procedure
- QSYS2/SYSPROCS – A view built over SYSROUTINE
- You can return multiple result sets from 1 SQL stored procedure. I find this interesting as a PHP dev because I can make 1 call to the database and have all the information needed to be displayed on a webpage. This is different from how many PHP frameworks handle retrieving data from the database layer, but I think it may help in increasing a PHP apps performance and simplicity. My blog post about how to access multiple result sets in PHP.
- Use Program Type Sub to create a srvpgm (service program) that should increase performance
- Arrays are supported but I’m unsure if you can pass a PHP array to a db2 stored procedure. I’m guessing the PECL ibm_db2 driver may need to be updated to support this.
- Ex: CREATE TYPE INTEGER_ARRAY AS INTEGER ARRAY
I only talked about what i found relevant to me you should see the full presentation slides and notes at: http://www.common.org/index.php/virtual-conference-a-expo.html