Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Call a subprocedure to calculate bonus.
DCL-PROC CalcBonus;
DCL-PI CalcBonus PACKED(7:2) END-PI;
DCL-PI Amount PACKED(7:2) END-PI;
RETURN Amount * 0.10;
END-PROC;
DCL-S Bonus PACKED(7:2);
Bonus = CalcBonus(5000);
DSPLY ('Bonus: ' + %CHAR(Bonus));
*INLR = *ON;RPG IV (also known as RPGLE) is a high-level programming language for IBM i (AS/400) systems, designed for business applications, supporting structured programming, modern free-form syntax, and integration with DB2 databases.
Origin & Creator
IBM developed RPG in the 1960s for business applications. RPG IV, released in the 1990s, modernized the language with free-form syntax, modularization, and integration with DB2.
Industrial Note
RPG IV is highly specialized for IBM i / AS/400 environments, primarily used in banking, retail, and enterprise ERP systems where reliability, legacy integration, and transaction processing are essential.