Two years ago IBM introduced a SQL function, SPLIT, that would break apart a string into parts. In the latest Technology Refreshes for IBM i 7.4 and 7.3 introduces into RPG a Built in Function, BiF, that does a similar thing.
The Split BiF, %SPLIT, breaks apart data from a string into a temporary array.
Let me started with some examples:
01 **free 02 dcl-s String char(100) inz('RPGPGM is a website that provides stories about IBMi') ; 03 dcl-s wkArray char(10) dim(10) ; 04 wkArray = %split(String) ; |