![split bif to break apart a string into array elements](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDy4xU-I33vE2QIAC60x-bij27VAkuWpOBzUAZvxqnuEmUyt22ujrDUEK7p2Tb1dDofGCSsPCMYTWvPTXzysk8rtaqd__-TZIdFk5dbJXW7K_i2RULeYUFGm98V7SV1jGSiutjZZ6Ehp8H/s200/rpg.png)
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) ; |