How to generate the Random number
Page 1 of 1
How to generate the Random number
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
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
Similar topics
» Generating a Random number on an iSeries in CL
» No of number records in a PF
» How can Job number of submitted job be retrieved in RPG program?c
» Have OS/400 notify you when a file contains more than a certain number of deleted records
» What is the maximum number of PRTOBJ functions that can be added to one PRTFIL function?
» No of number records in a PF
» How can Job number of submitted job be retrieved in RPG program?c
» Have OS/400 notify you when a file contains more than a certain number of deleted records
» What is the maximum number of PRTOBJ functions that can be added to one PRTFIL function?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|