und nochmal rein RPG
**free
dcl-s feld1 char(25) inz('A123456789012345678901234');
dcl-s feld2 char(25) inz('A 12345678901234567890123');
dcl-s feld3 char(25) inz('A B C12345678901234567890');
dcl-s Ausgabe varchar(50) inz;
dcl-s pos zoned( 5: 0 );

pos = 1;
ausgabe = feld1;
dou pos > 5;
if %subst(feld1 : pos:1) >= x'F0' and %subst(feld1 : pos:1) <= x'F9';
ausgabe = ' ' + %subst(ausgabe :1:25-pos);
endif;
pos += 1;
enddo;


Viele Wege führen nach Rom bzw. zum Ergebnis