/*REXX program displays combination sets for X things taken Y at a time. */ Parse Arg things size characters If things='?' Then Do Say 'rexx combi2 things size characters' Say ' defaults: 5 3 123456789...' Say 'example rexx combi2 , , xyzuvw' Say 'size<0 shows only the number of possible combinations' Exit End If things==''|things=="," Then things=5 /* No things specified? Then use default*/ If size=='' |size=="," Then size=3 /* No size specified? Then use default*/ Numeric Digits 20 show=sign(size) size=abs(size) If things'' then c=substr(characters,i,1) Else c=i If substr(ub,i,1)=1 Then res=res c End If show=1 then Say res Return 1 End Else Return 0 exit: Say '*****error*****' arg(1) Exit 13