D C0Seed S 10I 0 Inz(0)
D C0RndNbr S 8F
D* Random Number Conversion
D RndNbr S 10I 0
D MaxNbr S 10I 0 Inz(9000000)
D MinNbr S 10I 0 Inz(1000000)
C*
C DoU RndNbr >= MinNbr
C*
C CallB 'CEERAN0'
C Parm C0Seed
C Parm C0RndNbr
C Parm *OMIT
C*
C Eval RndNbr = %DecH(C0RndNbr:30:29) * MaxNbr
C EndDo
C*
C Return
So sorry, but it only works in interactive.
ReplyDeleteIn batch, CEERANO returns (quite) always the same number.