call aa
DSPLY TAA02
DSPLY TAA10
DSPLY TB000
h dftactgrp(*no) actgrp(*caller)
d ds
d string 5a inz('TAA01')
d ds
d rplValues 36A
inz('0123456789ABCDEFGHIJKLMNOPQRSTU-
d VWXYZ')
d rplAry 1a dim(%len(rplValues))
d overlay(rplValues)
/free
*inlr=*on;
string='TAA01';
exsr bubble;
dsply string;
string='TAA0Z';
exsr bubble;
dsply string;
string='TAZZZ';
exsr bubble;
dsply string;
return;
begsr bubble;
if %subst(string:5:1)=rplAry(%elem(rplAry));
%subst(string:5:1)=rplAry(1);
if %subst(string:4:1)=rplAry(%elem(rplAry));
%subst(string:4:1)=rplAry(1);
if %subst(string:3:1)=rplAry(%elem(rplAry));
%subst(string:3:1)=rplAry(1);
if %subst(string:2:1)=rplAry(%elem(rplAry));
// oh shucks!
else;
%subst(string:2:1)=rplAry(%lookup(%subst(string:2:1):rplAry)+1);
ENDIF;
Else;
%subst(string:3:1)=rplAry(%lookup(%subst(string:3:1):rplAry)+1);
ENDIF;
Else;
%subst(string:4:1)=rplAry(%lookup(%subst(string:4:1):rplAry)+1);
ENDIF;
else;
%subst(string:5:1)=rplAry(%lookup(%subst(string:5:1):rplAry)+1);
ENDIF;
endsr;
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.