Sponsors
Search
Link to our site
Learning Resources
pgm parm(&inparm) dcl &inparm *char 10 DCL &UPPER *CHAR 36 '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' DCL &LOWER *CHAR 36 '0123456789abcdefghijklmnopqrstuvwxyz' dcl &sst1 *DEC (2 0) value(1) /* exclude first character */ dcl &sst2 *DEC (2 0) value(0) A010: chgvar &sst1 (&sst1 + 1) if (&sst1 *le 10) + then(do) chgvar &sst2 0 A020: chgvar &sst2 (&sst2 + 1) if (&sst2 *le 36) + then(do) if (%sst(&inparm &sst1 1) *eq %sst(&upper &sst2 1)) + then(do) chgvar %sst(&inparm &sst1 1) %sst(&lower &sst2 1) goto a010 enddo goto a020 enddo goto a010 enddo endpgm
[report a broken link by clicking here]