Thanks to everyone for your guidance.
Appreciated much.
This is the code which produce the 4 digit random-numbers.
IDENTIFICATION DIVISION.
PROGRAM-ID. RANDOMWORK.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 RANDOM-NUMBER PIC 9(4).
01 S PIC 9(4).
01 A PIC 9(4) VALUE 65.
PROCEDURE DIVISION.
PERFORM VARYING S FROM 099 BY 1 UNTIL S > 1999
COMPUTE RANDOM-NUMBER = FUNCTION MOD(123456789123,S) + 99
IF RANDOM-NUMBER > 2000
COMPUTE RANDOM-NUMBER = RANDOM-NUMBER - A
END-IF
DISPLAY RANDOM-NUMBER
END-PERFORM.
STOP RUN.
Thanks,
Rati