MITHARG
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How to generate the Random number

Go down

 How to generate the Random number Empty How to generate the Random number

Post  Archana K Sun Jan 27, 2013 5:29 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


Archana K

Posts : 76
Join date : 2013-01-27
Age : 32
Location : chennai

Back to top Go down

Back to top


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