IBM i RPG Letter 2021 V3.pdf
2 Comments - no search term matches found in comments.
A workshop I made a few months ago. Thought it might be worth sharing it. It is a YouTube series and each part we do something new from the previous part.
In this session, after demonstrating the fundamentals of a procedure, you will learn the benefits of procedure-driven RPG. Together, we’ll explore real-world examples of how this mindset has improved my, as well as my team's code, on three facets: readability, maintainability and reusability
1375 -Gregory Simmons Procedure Driven RPG - 20 TechByte.pdf
See matching posts in thread - extracting IDL from RPG...Good day...
ibm i developer.png
If your application needs multithreading, the POSIX API for multithreading – called pthreads – is the classic way, to run multiple procedures parallel at the same time and in the same process. Using it in ILE-RPG is quite easy, if you know how. This example also shows, how to use standard C library functions like printf() and sprintf() in your RPG programs. Especially sprintf() can be a real time saver to format numbers to your needs, when %char() oder %editc() aren’t enough. Lets break down the program in pieces – we start at the top: We use free-format RPG – of course – and some standard headers. In this example, I’m using a „linear“ main procedure – no RPG cycle, no *INLR – and a named activation group
2 Comments - Even if you don't have any static variables coded, there's lots of static storage that RPG uses to control the module. In general, for any RPG module that might run in multiple threads, you should always add the THREAD keyword in the CTL-OPT statements, either THREAD(*SERIALIZE) or THREAD(*CONCURRENT)
See matching posts in thread - Replace RPG code with sql
See matching posts in thread - Automation Testing ( iSeries RPG...
See matching posts in thread - AS 400 (DB2) - RPG Calls...Hello, ...