PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

How to generate the Random number

View previous topic View next topic Go down

How to generate the Random number

Post  maran on Fri Dec 30, 2011 2:26 pm

Can be generated using the API CEERAN0

See the code below:

H DftActGrp(*No) ActGrp(*CALLER)

D PrdRandomNum PR ExtProc('CEERAN0')
D Seed 10I 0
D RandomNum 8F
D fc 12A Options(*OMIT)

D Start s 10i 0
D RandomNum s 8f
D DisplayNum s 16 16

C *Entry Plist
C Parm Start

/Free
PrdRandomNum(Start:RandomNum:*OMIT);
DisplayNum = RandomNum;
Dsply Start;
Dsply RandomNum;
*INLr = *ON;
/End-free

maran
Admin

Posts : 442
Join date : 2009-07-24

View user profile http://pmsinformationsystem.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum