=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000008 IDENTIFICATION DIVISION.
000009 PROGRAM-ID. SORTEX.
000010 AUTHOR. SRIRAM R.
000011
000012 ENVIRONMENT DIVISION.
000013 INPUT-OUTPUT SECTION.
000014 FILE-CONTROL.
000015 SELECT WORKFILE ASSIGN TO TEMPFILE.
000016 SELECT SRCFILE ASSIGN TO SRCFILE0.
000017 SELECT SORTEDFILE ASSIGN TO SRTDFILE.
000018
000019 DATA DIVISION.
000020 FILE SECTION.
000021
000022 SD WORKFILE.
000023 01 WRKRECS.
000024 02 WRK-NAME PIC X(10).
000025 02 WRK-ID PIC 9(8).
000026
000027 FD SRCFILE.
000028 01 SRCRECS.
000029 02 SRC-NAME PIC X(10).
000030 02 SRC-ID PIC 9(8).
000031
000032 FD SORTEDFILE.
000033 01 SRTDRECS.
000034 02 SRTD-NAME PIC X(10).
000035 02 SRTD-ID PIC 9(8).
000036
000037 PROCEDURE DIVISION.
000038 BEGIN.
000039 SORT WORKFILE ON ASCENDING KEY WRK-ID
000040 USING SRCFILE
000041 GIVING SORTEDFILE.
000042 IF SORT-RETURN > 0 THEN
000043 DISPLAY "SORT FAILED!!!"
000044 ELSE
000045 DISPLAY "SORT SUCCESS!!!"
000046 END-IF
000047 STOP RUN.
Please help in identifying, where exactly the problem is. Thanks guys..!!