Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
D ARR S 5I 0 DIM(5) INZ(1:2:3:4:5)
D SUM S 10I 0 INZ(0)
D I S 5I 0
C *ENTRY PLIST
C PARM
C FOR I = 1 TO 5
C SUM += ARR(I)
C ENDFOR
C WRITE SUMCoding works best on desktop or with an external keyboard.
D ARR S 5I 0 DIM(5) INZ(1:2:3:4:5)
D SUM S 10I 0 INZ(0)
D I S 5I 0
C *ENTRY PLIST
C PARM
C FOR I = 1 TO 5
C SUM += ARR(I)
C ENDFOR
C WRITE SUMCoding works best on desktop or with an external keyboard.
Calculates the sum of an array.
D ARR S 5I 0 DIM(5) INZ(1:2:3:4:5)
D SUM S 10I 0 INZ(0)
D I S 5I 0
C *ENTRY PLIST
C PARM
C FOR I = 1 TO 5
C SUM += ARR(I)
C ENDFOR
C WRITE SUMRPG (Report Program Generator) is a high-level programming language primarily used for business applications, especially on IBM midrange systems like AS/400 and IBM i, for generating reports and handling data processing tasks.
Origin & Creator
Developed in 1959 by IBM, originally for IBM 1401 systems; evolved into RPG IV on IBM i platforms.
Industrial Note
RPG powers many legacy enterprise applications in banks, manufacturing, and government systems, often running critical business processes on IBM i (AS/400) systems.