RPGIV @ Work

A unique site for RPG and System i Lovers


Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

Generate Random Passwords Print E-mail
User Rating: / 4
Written by Chamara Withanachchi   
 D randPwd         PR            15A 
 D random          PR                  ExtProc('CEERAN0')
 D                               10U 0 
 D                                8F 
 D                               12    Options(*Omit) 
  *Call prodedure
 C                   Eval      rndPwd = randPwd()

/TITLE ..... Generate Random Dasswords ....
P randPwd B

D PI 15a
D seed S 10u 0 Inz(0)
D floater S 8f
D fc S 12a
D pwd S 15a
D $I S 3s 0
D alpha S 36a



For $I = 1 to 15;
random( seed: floater : fc );
%SubSt( pwd : $I : 1 ) =
%SubSt( alpha : %Int(floater * 36 + 1) : 1 );
Return pwd;


P randPwd E

User Comments

Please login or register to add comments

<Previous   Next>