Home   Easy-Code    Forum  Updater 
Twitter Facebook



Employe Data Manager COBOL Project

Critics Rating:

Users Rating:

Software program written in COBOL, maintains important employee details of various departments of a particular organization. This data manager project can be used by HR department in colleges. This software has easy command prompt interface with function keys enabled for quick retrieval of details.

Helpful for all programmers submitting their academic project in COBOL.

IDENTIFICATION DIVISION.
   PROGRAM-ID. ASE.
   ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
   FILE-CONTROL
      SELECT DEPFILE ASSIGN TO DISK
      ORGANIZATION IS LINE SEQUENTIAL
FILE STATUS IS ST1.
SELECT DTMPFILE ASSIGN TO DISK
ORGANIZATION IS LINE SEQUENTIAL.
   SELECT EMPFILE ASSIGN TO DISK
      ORGANIZATION IS LINE SEQUENTIAL
   FILE STATUS IS ST2.
SELECT ETMPFILE ASSIGN TO DISK
ORGANIZATION IS LINE SEQUENTIAL.
   DATA DIVISION.
FILE SECTION.
FD DEPFILE
LABEL RECORDS ARE STANDARD
      VALUE OF FILE-ID IS "DEP.DAT".
01 DEP.
02 DNO PIC 9(3).
02 DNAME PIC A(10).
02 DLOC PIC X(10).
   FD DTMPFILE
      LABEL RECORDS ARE STANDARD
      VALUE OF FILE-ID IS "DTMP.DAT".
01 DTMP.
02 DNO1 PIC 9(3).
02 DNAME1 PIC A(10).
02 DLOC1 PIC X(10).
FD EMPFILE
LABEL RECORDS ARE STANDARD
      VALUE OF FILE-ID IS "EMP.DAT".
01 EMP.
02 ENO PIC 9(3).
02 ENAME PIC A(10).
02 SAL PIC 9(6).
02 HRA PIC 9(6)V9(2).
02 DA PIC 9(6)V9(2).
02 GROS PIC 9(7)V9(2).
02 ADD1 PIC X(10).
02 ADD2 PIC X(10).
02 ADD3 PIC X(10).
02 PNO PIC 9(6).
02 DES PIC A(9).
    02 DNUM PIC 9(3).
02 DNAM PIC A(10).
   FD ETMPFILE
      LABEL RECORDS ARE STANDARD
      VALUE OF FILE-ID IS "ETMP.DAT".
01 ETMP.
02 ENO1 PIC 9(3).
02 ENAME1 PIC A(10).
02 SAL1 PIC 9(6).
02 HRA1 PIC 9(6)V9(2).
02 DA1 PIC 9(6)V9(2).
02 GROS1 PIC 9(7)V9(2).
02 ADD11 PIC X(10).
02 ADD21 PIC X(10).
02 ADD31 PIC X(10).
02 PNO1 PIC 9(6).
02 DES1 PIC A(9).
    02 DNUM1 PIC 9(3).
02 DNAM1 PIC A(10).
WORKING-STORAGE SECTION.
77 ESC PIC 9(2).
77 NUM PIC 9.
   77 EOF PIC A.
77 EOF1 PIC A.
77 X PIC A .
77 Y PIC A .
77 N3 PIC 9(3) VALUE 1.
77 S PIC 9(3).
77 S3 PIC Z(7).9(2).
77 S1 PIC 9(3).
77 NAME PIC A(10).
77 S2 PIC Z(6).
77 ST1 PIC X(2).
   77 ST2 PIC X(2).
01 DD.
02 YER1 PIC 9(2).
02 MON1 PIC 9(2).
02 DAY1 PIC 9(2).
01 DD1.
02 DAY1 PIC 9(2).
02 F PIC X VALUE "-".
02 MON1 PIC 9(2).
02 F PIC X VALUE "-".
02 YER1 PIC 9(2).
01 BAR.
02 F PIC X(80) VALUE ALL "=".
SCREEN SECTION.
PROCEDURE DIVISION.
PARA.
ACCEPT DD FROM DATE.
MOVE CORR DD TO DD1.
PERFORM PARA-34.
DISPLAY ( 8 , 26 ) " MAIN MENU " .
DISPLAY ( 9 , 26 ) " ----------- ".
DISPLAY ( 11 , 26 ) "DEPARTMENT DETAILS : 1".
DISPLAY ( 13 , 26 ) "EMPLOYEE DETAILS : 2".
DISPLAY ( 15 , 26 ) "HELP MENU : 3".
DISPLAY ( 17 , 26 ) "EXIT APPLICATION : 4".
DISPLAY ( 19 , 26 ) "ENTER YOUR CHOICE[1/2/3]: ".
MOVE 19 TO LIN.
MOVE 52 TO COL.
MOVE 7 TO NUM.
PERFORM PARA-35 UNTIL NUM NOT< 0 AND NUM < 5.
ACCEPT ESC FROM ESCAPE KEY.
GO TO PARA-31 PARA-40 PARA-0 PARA-9 PARA-21 PARA-2 PARA-1
PARA-22 PARA-24 PARA-26 PARA-10 DEPENDING ON ESC.
IF NUM = 0
GO TO PARA.
GO TO PARA-0 PARA-9 PARA-40 PARA-31 DEPENDING ON NUM.
PARA-35.
DISPLAY ( LIN , COL ) " ".
ACCEPT( LIN , COL ) NUM WITH AUTO-SKIP.
PARA-34.
DISPLAY ( 1 , 1 ) ERASE.
DISPLAY ( 1 , 1 ) BAR.
DISPLAY ( 2 , 3 ) "F1-HELP F2-DEP "
"F3-EMP F4-VIEW F5-VIEWDEP F6-ADDDEP ".
DISPLAY ( 3 , 3 ) "F7-VIEWEACHEMP F8-VIEWDEPEMP "
"F9-VIEWALLEMP F10-ADDEMP ESC-EXIT" .
DISPLAY ( 4 , 1 ) BAR.
DISPLAY ( 22 , 72 ) DD1.
DISPLAY ( 23 , 72 ) "--------".
PARA-0.
PERFORM PARA-34.
DISPLAY ( 7 , 27 ) " DEPARTMENT SUB-MENU ".
DISPLAY ( 8 , 27 ) " ---------------------".
      DISPLAY ( 10 , 27 ) "ADD DEPARTMENT DETAILS : 1".
      DISPLAY ( 12 , 27 ) "VIEW DEPARTMENT DETAILS : 2".
DISPLAY ( 14 , 27 ) "DELETE DEPARTMENT DETAILS : 3".
DISPLAY ( 16 , 27 ) "EXIT TO MAIN MENU : 4".
      DISPLAY ( 18 , 27 ) "ENTER YOUR CHOICE[1/2/3/4]: ".
MOVE 18 TO LIN.
MOVE 55 TO COL.
MOVE 7 TO NUM .
PERFORM PARA-35 UNTIL NUM NOT< 0 AND NUM < 5.
ACCEPT ESC FROM ESCAPE KEY.
GO TO PARA-31 PARA-40 PARA-0 PARA-9 PARA-21 PARA-2 PARA-1
PARA-22 PARA-24 PARA-26 PARA-10 DEPENDING ON ESC.
IF NUM = 0
GO TO PARA-0.
GO TO PARA-1 PARA-2 PARA-4 PARA DEPENDING ON NUM.
PARA-1.
MOVE "Y" TO EOF.
MOVE 1 TO N3.
OPEN INPUT DEPFILE.
IF ST1 NOT= "30"
PERFORM PARA-8 UNTIL EOF = "E".
CLOSE DEPFILE.
PERFORM PARA-7.
      MOVE N3 TO DNO1.
DISPLAY ( 7 , 25 ) DNO1 .
ACCEPT ( 7 , 55 ) DNAME1 WITH PROMPT EMPTY-CHECK.
      ACCEPT ( 10 , 25 ) DLOC1 WITH PROMPT EMPTY-CHECK.
MOVE "Z" TO X.
MOVE 23 TO LIN.
MOVE 25 TO COL.
PERFORM PARA-36 UNTIL X = "Y" OR X = "N".
IF ( X = "Y" )
OPEN EXTEND DEPFILE
WRITE DEP FROM DTMP
CLOSE DEPFILE.
MOVE "Z" TO X.
MOVE 23 TO LIN.
MOVE 55 TO COL.
PERFORM PARA-36 UNTIL X = "Y" OR X = "N".
IF ( X = "Y")
GO TO PARA-1.
      GO TO PARA-0.
PARA-36.
ACCEPT ( LIN , COL ) X WITH AUTO-SKIP.
IF ( X = "y")
MOVE "Y" TO X.
IF ( X = "n")
MOVE "N" TO X.
IF ( X NOT= "Y" AND X NOT= "N" )
DISPLAY ( LIN , COL ) " ".
PARA-8.
READ DEPFILE AT END MOVE "E" TO EOF.
IF ( EOF NOT= "E" )
COMPUTE N3 = N3 + 1.
PARA-2.
PERFORM PARA-7.
DISPLAY ( 23 , 5 ) " ".
      OPEN INPUT DEPFILE.
MOVE "Y" TO EOF.
ACCEPT ( 7 , 25 ) S WITH PROMPT EMPTY-CHECK.
IF ST1 NOT= "30"
PERFORM PARA-3 UNTIL EOF = "E"
ELSE
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 10 , 25 ) "DEPARTMENTS ARE NOT PRESENT"
"..[OK]"
ACCEPT ( 10 , 55 ) X WITH AUTO-SKIP
CLOSE DEPFILE
GO TO PARA-0.
CLOSE DEPFILE.
IF ( X = "Y" )
GO TO PARA-2
ELSE
GO TO PARA-0.
   PARA-3.
      READ DEPFILE RECORD AT END MOVE "E" TO EOF.
IF ( EOF NOT= "E")
IF ( DNO = S)
DISPLAY ( 7 , 55 ) DNAME
DISPLAY ( 10 , 25 ) DLOC
MOVE "Z" TO X
MOVE 23 TO LIN
MOVE 55 TO COL
PERFORM PARA-36 UNTIL X = "Y" OR X = "N"
MOVE "E" TO EOF
ELSE
NEXT SENTENCE
ELSE
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 12 , 20 )" NO SUCH NUMBER EXISTS [OK] :"
DISPLAY ( 23 , 60 ) " CONTINUE[Y/N] :"
MOVE "Z" TO X
MOVE 23 TO LIN
MOVE 77 TO COL
PERFORM PARA-36 UNTIL X = "Y" OR X = "N".
PARA-4.
PERFORM PARA-7.
ACCEPT ( 7 , 25 ) S WITH PROMPT EMPTY-CHECK.
OPEN INPUT DEPFILE.
OPEN OUTPUT DTMPFILE.
MOVE "Y" TO EOF.
MOVE 1 TO N3.
IF ST1 NOT= "30"
PERFORM PARA-5 UNTIL EOF = "E"
ELSE
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 10 , 25 ) "DEPARTMENTS ARE NOT PRESENT"
"..[OK]"
ACCEPT ( 10 , 55 ) X WITH AUTO-SKIP
CLOSE DEPFILE DTMPFILE
GO TO PARA-0.
      PERFORM PARA-5 UNTIL EOF = "E".
CLOSE DTMPFILE , DEPFILE.
OPEN INPUT DTMPFILE.
OPEN OUTPUT DEPFILE.
MOVE "Y" TO EOF.
MOVE 0 TO N3.
PERFORM PARA-6 UNTIL EOF = "E".
CLOSE DTMPFILE , DEPFILE.
IF ( X = "Y" )
OPEN INPUT ETMPFILE
OPEN OUTPUT EMPFILE
MOVE "Y" TO EOF
PERFORM PARA-20 UNTIL EOF = "E"
CLOSE EMPFILE , ETMPFILE.
MOVE "Z" TO X.
MOVE 23 TO LIN.
MOVE 55 TO COL.
PERFORM PARA-36 UNTIL X = "Y" OR X = "N".
      IF ( X = "Y")
       GO TO PARA-4.
GO TO PARA-0.
PARA-20.
READ ETMPFILE AT END MOVE "E" TO EOF.
IF ( EOF NOT= "E" )
WRITE EMP FROM ETMP.
   PARA-5.
      READ DEPFILE RECORD AT END MOVE "E" TO EOF.
IF ( EOF NOT= "E")
IF ( DNO = S)
DISPLAY ( 7 , 55 ) DNAME
DISPLAY ( 10 , 25 ) DLOC
MOVE "Z" TO X
MOVE 23 TO LIN
MOVE 25 TO COL
PERFORM PARA-36 UNTIL X = "Y" OR X = "N"
COMPUTE N3 = 0
IF ( X NOT= "Y" )
WRITE DTMP FROM DEP
ELSE
MOVE "Y" TO EOF1
OPEN INPUT EMPFILE
OPEN OUTPUT ETMPFILE
COMPUTE S1 = 0
PERFORM PARA-19 UNTIL EOF1 = "E"
CLOSE EMPFILE , ETMPFILE
ELSE
WRITE DTMP FROM DEP.
IF ( EOF = "E" AND N3 NOT=0 )
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 12 , 20 )" NO SUCH NUMBER EXISTS [OK] :"
DISPLAY ( 23 , 37 ) " CONTINUE[Y/N] :"
COMPUTE N3 = N3 + 1.
PARA-19.
READ EMPFILE AT END MOVE "E" TO EOF1.
IF ( EOF1 NOT= "E" )
IF ( DNO NOT= DNUM )
COMPUTE S1 = S1 + 1
MOVE S1 TO ENO
IF ( DNO > DNUM )
WRITE ETMP FROM EMP
ELSE
COMPUTE DNUM = DNUM - 1
WRITE ETMP FROM EMP.
PARA-6.
READ DTMPFILE AT END MOVE "E" TO EOF.
COMPUTE DNO1 , N3 = N3 + 1.
IF ( EOF NOT= "E" )
WRITE DEP FROM DTMP.
PARA-7.
DISPLAY ( 1 , 1 ) ERASE.
      DISPLAY ( 4 , 31 ) "DEPARTMENT DETAILS".
      DISPLAY ( 5 , 31 ) "------------------".
      DISPLAY ( 7 , 5 ) "Department Number :".
DISPLAY ( 10 , 5 ) "Location :".
DISPLAY ( 7 , 35 ) "Department name :".
      DISPLAY ( 23 , 5 ) "Confirm[Y/N] :".
DISPLAY ( 23 , 35 ) "Continue[Y/N] :".
PARA-9.
PERFORM PARA-34.
DISPLAY ( 7 , 25 ) " EMPLOYEE SUB-MENU".
DISPLAY ( 8 , 25 ) " -------------------".
DISPLAY ( 10 , 25 ) "ADD EMPLOYEE DETAILS : 1".
      DISPLAY ( 12 , 25 ) "MODIFY EMPLOYEE DETAILS : 2".
      DISPLAY ( 14 , 25 ) "VIEW EMPLOYEE DETAILS : 3".
      DISPLAY ( 16 , 25 ) "DELETE EMPLOYEE DETAILS : 4".
      DISPLAY ( 18 , 25 ) "EXIT TO MAIN MENU : 5".
DISPLAY ( 20 , 25 ) "ENTER YOUR CHOICE[1/2/3/4/5] : " .
MOVE 20 TO LIN.
MOVE 56 TO COL.
MOVE 7 TO NUM.
PERFORM PARA-35 UNTIL NUM NOT< 0 AND NUM < 6.
ACCEPT ESC FROM ESCAPE KEY.
GO TO PARA-31 PARA-40 PARA-0 PARA-9 PARA-21 PARA-2 PARA-1
PARA-22 PARA-24 PARA-26 PARA-10 DEPENDING ON ESC.
IF NUM = 0
GO TO PARA-9.
GO TO PARA-10 PARA-15 PARA-21 PARA-28 PARA
               DEPENDING ON NUM.
PARA-10.
MOVE "Y" TO EOF.
MOVE 1 TO N3.
OPEN INPUT DEPFILE.
IF ST1 = "30"
CLOSE DEPFILE
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 10 , 25 ) " DEPARTMENTS ARE NOT PRESENT"
"..[OK]"
ACCEPT ( 10 , 55 ) X WITH AUTO-SKIP
GO TO PARA-9.
CLOSE DEPFILE.
OPEN INPUT EMPFILE.
IF ST2 NOT= "30"
PERFORM PARA-11 UNTIL EOF = "E".
CLOSE EMPFILE.
PERFORM PARA-12.
      MOVE N3 TO ENO1.
DISPLAY ( 7 , 22 ) ENO1.
ACCEPT ( 9 , 22 ) ENAME1 WITH PROMPT EMPTY-CHECK.
DISPLAY ( 12 , 22 )"..........".
DISPLAY ( 13 , 22 )"..........".
ACCEPT ( 11 , 22 ) ADD11 WITH PROMPT EMPTY-CHECK
                AUTO-SKIP.
ACCEPT ( 12 , 22 ) ADD21 WITH PROMPT AUTO-SKIP.
ACCEPT ( 13 , 22 ) ADD31 WITH PROMPT.
ACCEPT ( 15 , 22 ) PNO1 WITH PROMPT.
ACCEPT ( 17 , 22 ) DES1 WITH PROMPT EMPTY-CHECK.
GO TO PARA-13.
PARA-37.
ACCEPT ( 7 , 64 ) SAL1 WITH PROMPT EMPTY-CHECK.
PARA-33.
DISPLAY ( 15 , 64 ) DNAM1.
MOVE 0 TO SAL1.
PERFORM PARA-37 UNTIL SAL1 > 0.
COMPUTE HRA1 = SAL1 * 0.20.
COMPUTE DA1 = SAL1 * 0.15.
COMPUTE GROS1 = HRA1 + DA1 + SAL1.
MOVE HRA1 TO S3.
DISPLAY ( 9 , 64 ) S3.
MOVE DA1 TO S3.
DISPLAY ( 11 , 64 ) S3.
MOVE GROS1 TO S3.
DISPLAY ( 13 , 64 ) S3.
MOVE "Z" TO X.
MOVE 23 TO LIN.
MOVE 22 TO COL.
PERFORM PARA-36 UNTIL X = "Y" OR X = "N".
IF ( X = "Y" )
OPEN EXTEND EMPFILE
WRITE EMP FROM ETMP
       CLOSE EMPFILE.
MOVE "Z" TO X.
MOVE 23 TO LIN.
MOVE 64 TO COL.
PERFORM PARA-36 UNTIL X = "Y" OR X = "N".
IF ( X = "Y" )
GO TO PARA-10.
      GO TO PARA-9.
PARA-11.
READ EMPFILE AT END MOVE "E" TO EOF.
IF ( EOF NOT= "E" )
COMPUTE N3 = N3 + 1.
PARA-12.
    DISPLAY ( 1 , 1 ) ERASE.
    DISPLAY ( 3 , 32 ) "EMPLOYEE DETAILS".
DISPLAY ( 5 , 32 ) "----------------".
DISPLAY ( 7 , 3 ) "EMPLOYEE NUMBER : ".
DISPLAY ( 9 , 3 ) "EMPLOYEE NAME : ".
DISPLAY ( 11 , 3 ) "ADDRESS : ".
DISPLAY ( 15 , 3 ) "PHONE : ".
DISPLAY ( 17 , 3 ) "DESIGNATION : ".
DISPLAY ( 19 , 3 ) "DEPARTMENT NUMBER : ".       
DISPLAY ( 23 , 3 ) "CONFIRM[Y/N] : ".
DISPLAY ( 7 , 45 ) "SALARY : ".
DISPLAY ( 9 , 45 ) "H.R.A. : ".
DISPLAY ( 11 , 45 ) "D.A. : ".
DISPLAY ( 13 , 45 ) "TOTAL : ".
DISPLAY ( 15 , 45 ) "DEPARTMENT NAME : ".
    DISPLAY ( 23 , 45 ) "CONTINUE[Y/N] : ".
PARA-13.
ACCEPT ( 19 , 22 ) DNUM1 WITH PROMPT EMPTY-CHECK.
OPEN INPUT DEPFILE.
MOVE 0 TO DNO.
MOVE "Y" TO EOF.
PERFORM PARA-14 UNTIL DNUM1 = DNO.
IF X = "Y" AND EOF = "E"
CLOSE DEPFILE
GO TO PARA-13.
IF X NOT= "Y" AND EOF = "E"
CLOSE DEPFILE
GO TO PARA-9.
MOVE DNAME TO DNAM1.
CLOSE DEPFILE.
GO TO PARA-33.
PARA-14.
READ DEPFILE AT END MOVE "E" TO EOF.
IF ( EOF = "E" )
DISPLAY ( 17 , 45 ) "NO SUCH NUMBER EXISTS [OK]..."
MOVE "Z" TO X
MOVE 23 TO LIN
MOVE 64 TO COL
PERFORM PARA-36 UNTIL X = "Y" OR X = "N"
DISPLAY ( 17 , 45 ) " "
DISPLAY ( 23 , 45 ) "CONTINUE[Y/N] : "
MOVE DNUM1 TO DNO.
PARA-15.
MOVE "Y" TO EOF1.
OPEN INPUT EMPFILE.
PERFORM PARA-12.
      ACCEPT ( 7 , 22 ) N3 WITH PROMPT EMPTY-CHECK.
IF ST2 NOT= "30"
PERFORM PARA-16 UNTIL EOF1 NOT= "Y"
ELSE
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 10 , 25 ) "EMPLOYEES ARE NOT PRESENT"
"..[OK]"
ACCEPT ( 10 , 55 ) X WITH AUTO-SKIP
CLOSE EMPFILE
GO TO PARA-9.
      CLOSE EMPFILE.
MOVE "Z" TO X.
MOVE 23 TO LIN.
MOVE 64 TO COL.
PERFORM PARA-36 UNTIL X = "Y" OR X = "N".
IF ( X = "Y" )
GO TO PARA-15.
GO TO PARA-9.
PARA-16.
READ EMPFILE INTO ETMP AT END MOVE "E" TO EOF1.
IF ( EOF1 = "E" )
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 12 , 20 ) "NO SUCH NUMBER EXISTS [OK]...."
DISPLAY ( 23 , 45 ) "CONTINUE[Y/N] : ".
IF ( EOF1 NOT= "E" )
IF ( ENO1 = N3 )
DISPLAY ( 9 , 22 ) ENAME1
DISPLAY ( 11 , 22 ) ADD11
DISPLAY ( 12 , 22 ) ADD21
DISPLAY ( 13 , 22 ) ADD31
DISPLAY ( 15 , 22 ) PNO1
DISPLAY ( 17 , 22 ) DES1
DISPLAY ( 19 , 22 ) DNUM1
DISPLAY ( 7 , 64 ) SAL1
MOVE HRA1 TO S3
DISPLAY ( 9 , 64 ) S3
MOVE DA1 TO S3
DISPLAY ( 11 , 64 ) S3
MOVE GROS1 TO S3
DISPLAY ( 13 , 64 ) S3
DISPLAY ( 15 , 64 ) DNAM1
ACCEPT ( 9 , 22 ) ENAME1 WITH UPDATE
       ACCEPT ( 11 , 22 ) ADD11 WITH UPDATE AUTO-SKIP
ACCEPT ( 12 , 22 ) ADD21 WITH UPDATE AUTO-SKIP
ACCEPT ( 13 , 22 ) ADD31 WITH UPDATE
ACCEPT ( 15 , 22 ) PNO1 WITH UPDATE
ACCEPT ( 17 , 22 ) DES1 WITH UPDATE
PERFORM PARA-17
DISPLAY ( 15 , 64 ) DNAM1
MOVE 0 TO SAL
PERFORM PARA-39 UNTIL SAL > 0
MOVE SAL TO SAL1
COMPUTE HRA1 = SAL1 * 0.20
COMPUTE DA1 = SAL1 * 0.15
COMPUTE GROS1 = HRA1 + DA1 + SAL1
MOVE HRA1 TO S3
DISPLAY ( 9 , 64 ) S3
MOVE DA1 TO S3
DISPLAY ( 11 , 64 ) S3
MOVE GROS1 TO S3
DISPLAY ( 13 , 64 ) S3
MOVE "E" TO EOF1
MOVE "Z" TO X
MOVE 23 TO LIN
MOVE 22 TO COL
PERFORM PARA-36 UNTIL X = "Y" OR X = "N"
CLOSE EMPFILE
IF ( X = "Y" )
MOVE "Y" TO EOF
OPEN I-O EMPFILE
PERFORM PARA-38 UNTIL EOF = "E"
CLOSE EMPFILE.
PARA-39.
MOVE SAL1 TO SAL.
ACCEPT ( 7 , 64 ) SAL WITH UPDATE PROMPT.
PARA-38.
READ EMPFILE AT END MOVE "E" TO EOF.
IF ( EOF NOT= "E" )
IF ( ENO = ENO1 )
REWRITE EMP FROM ETMP.
PARA-17.
MOVE DNUM1 TO S.
ACCEPT ( 19 , 22 ) S WITH UPDATE .
DISPLAY ( 18 , 45 ) " ".
DISPLAY ( 19 , 45 ) " ".
OPEN INPUT DEPFILE.
MOVE 0 TO DNO.
MOVE "Y" TO EOF.
PERFORM PARA-18 UNTIL S = DNO.
IF ( S = DNO AND EOF NOT= "E")
MOVE DNAME TO DNAM1
CLOSE DEPFILE
ELSE
CLOSE DEPFILE
GO TO PARA-17.
PARA-18.
READ DEPFILE AT END MOVE "E" TO EOF.
IF ( EOF = "E" )
MOVE DNUM1 TO S
MOVE S TO DNO
DISPLAY ( 18 , 45 ) " NO SUCH NUMBER EXISTS..[OK]."
DISPLAY ( 19 , 45 ) " ENTER AGAIN".
PARA-21.
PERFORM PARA-34.
DISPLAY ( 7 , 25 ) " VIEW SUB-MENU".
DISPLAY ( 8 , 25 ) " ---------------".
DISPLAY ( 10 , 25 ) "VIEW AN EMPLOYEE DETAIL : 1".
DISPLAY ( 12 , 25 ) "VIEW DEPARTMENT WISE : 2".
DISPLAY ( 14 , 25 ) "VIEW ALL EMPLOYEE : 3".
DISPLAY ( 16 , 25 ) "EXIT TO SUBMENU : 4".
DISPLAY ( 18 , 25 ) "ENTER YOUR CHOICE[1/2/3/4]: ".
MOVE 18 TO LIN.
MOVE 53 TO COL.
MOVE 7 TO NUM.
PERFORM PARA-35 UNTIL NUM NOT< 0 AND NUM < 5.
ACCEPT ESC FROM ESCAPE KEY.
GO TO PARA-31 PARA-40 PARA-0 PARA-9 PARA-21 PARA-2 PARA-1
PARA-22 PARA-24 PARA-26 PARA-10 DEPENDING ON ESC.
IF NUM = 0
GO TO PARA-21.
GO TO PARA-22 PARA-24 PARA-26 PARA-9 DEPENDING ON NUM.
PARA-22.
PERFORM PARA-12.
DISPLAY ( 23 , 3 ) " ".
      OPEN INPUT EMPFILE.
MOVE "Y" TO EOF.
ACCEPT ( 7 , 22 ) S WITH PROMPT EMPTY-CHECK.
IF ST2 NOT= "30"
PERFORM PARA-23 UNTIL EOF = "E"
ELSE
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 10 , 25 ) "EMPLOYEES ARE NOT PRESENT"
"..[OK]"
ACCEPT ( 10 , 55 ) X WITH AUTO-SKIP
CLOSE EMPFILE
GO TO PARA-21.
CLOSE EMPFILE.
IF ( X = "Y" )
GO TO PARA-22
ELSE
GO TO PARA-21.
   PARA-23.
      READ EMPFILE RECORD AT END MOVE "E" TO EOF.
IF ( EOF NOT= "E")
IF ( ENO = S)
DISPLAY ( 9 , 22 ) ENAME
DISPLAY ( 11 , 22 ) ADD1
DISPLAY ( 12 , 22 ) ADD2
DISPLAY ( 13 , 22 ) ADD3
DISPLAY ( 15 , 22 ) PNO
DISPLAY ( 17 , 22 ) DES
DISPLAY ( 19 , 22 ) DNUM
MOVE SAL TO S3
DISPLAY ( 7 , 64 ) S3
MOVE HRA TO S3
DISPLAY ( 9 , 64 ) S3
MOVE DA TO S3
DISPLAY ( 11 , 64 ) S3
MOVE GROS TO S3
DISPLAY ( 13 , 64 ) S3
DISPLAY ( 15 , 64 ) DNAM
MOVE "Z" TO X
MOVE 23 TO LIN
MOVE 64 TO COL
PERFORM PARA-36 UNTIL X = "Y" OR X = "N"
MOVE "E" TO EOF
ELSE
NEXT SENTENCE
ELSE
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 12 , 20 )" NO SUCH NUMBER EXISTS [OK] :"
DISPLAY ( 23 , 60 ) " CONTINUE[Y/N] :"
MOVE "Z" TO X
MOVE 23 TO LIN
MOVE 77 TO COL
PERFORM PARA-36 UNTIL X = "Y" OR X = "N".
PARA-24.
DISPLAY ( 1 , 1 ) ERASE.
DISPLAY ( 12 , 25 ) "ENTER THE DEPARTMENT NUMBER :".
ACCEPT ( 12 , 55 ) S WITH PROMPT EMPTY-CHECK.
OPEN INPUT EMPFILE.
MOVE "Y" TO EOF.
MOVE 0 TO N3.
DISPLAY ( 1 , 1 ) ERASE.
DISPLAY ( 1 , 3 ) "DEPARTMENT NAME :"
DISPLAY ( 3 , 3 ) "EMPLOYEE NUMBER"
DISPLAY ( 3 , 33 ) "EMPLOYEE NAME"
DISPLAY ( 3 , 62 ) "DESIGNATION"
COMPUTE LIN = 5.
IF ST2 NOT= "30"
PERFORM PARA-25 UNTIL EOF = "E"
ELSE
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 10 , 25 ) "EMPLOYEES ARE NOT PRESENT"
"..[OK]"
ACCEPT ( 10 , 55 ) X WITH AUTO-SKIP
CLOSE EMPFILE
GO TO PARA-21.
CLOSE EMPFILE.
DISPLAY ( 23 , 37 ) "CONTINUE[Y/N] :".
MOVE "Z" TO X.
MOVE 23 TO LIN.
MOVE 54 TO COL.
PERFORM PARA-36 UNTIL X = "Y" OR X = "N".
      IF ( X = "Y")
       GO TO PARA-24.
GO TO PARA-21.
   PARA-25.
      READ EMPFILE RECORD AT END MOVE "E" TO EOF.
IF ( EOF NOT= "E")
IF ( DNUM = S )
COMPUTE N3 = N3 + 1
DISPLAY ( 1 , 20 ) DNAM
DISPLAY ( LIN , 3 ) ENO
DISPLAY ( LIN , 33 ) ENAME
DISPLAY ( LIN , 62 ) DES
COMPUTE LIN = LIN + 2.
IF ( N3 = 9 )
DISPLAY ( 23 , 50 ) " PRESS ANY KEY TO CONTINUE"
ACCEPT ( 23 , 79 )X WITH AUTO-SKIP
DISPLAY ( 3 , 3 ) ERASE
DISPLAY ( 3 , 3 ) "EMPLOYEE NUMBER"
DISPLAY ( 3 , 33 ) "EMPLOYEE NAME"
DISPLAY ( 3 , 62 ) "DESGINATION"
COMPUTE N3 = 1
COMPUTE LIN = 5.
IF ( EOF = "E" AND N3 = 0 )
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 12 , 20 )" EMPLOYEES ARE NOT PRESENT [OK] :"
DISPLAY ( 23 , 37 ) " CONTINUE[Y/N] :"
COMPUTE N3 = N3 + 1.
PARA-26.
DISPLAY ( 1 , 1 ) ERASE.
OPEN INPUT EMPFILE.
MOVE "Y" TO EOF.
MOVE 0 TO N3.
DISPLAY ( 1 , 1 ) ERASE.
DISPLAY ( 3 , 3 ) "EMPLOYEE NUMBER"
DISPLAY ( 3 , 33 ) "EMPLOYEE NAME"
DISPLAY ( 3 , 62 ) "DESIGNATION"
COMPUTE LIN = 5.
IF ST2 NOT= "30"
PERFORM PARA-27 UNTIL EOF = "E"
ELSE
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 10 , 25 ) "EMPLOYEES ARE NOT PRESENT"
"..[OK]"
ACCEPT ( 10 , 55 ) X WITH AUTO-SKIP
CLOSE EMPFILE
GO TO PARA-21.
CLOSE EMPFILE.
DISPLAY ( 23 , 36 ) "PRESS ANY KEY "
ACCEPT ( 23 , 79 ) EOF WITH AUTO-SKIP.
      IF ( X = "Y")
       GO TO PARA-26.
GO TO PARA-21.
   PARA-27.
      READ EMPFILE RECORD AT END MOVE "E" TO EOF.
IF ( EOF NOT= "E")
COMPUTE N3 = N3 + 1
DISPLAY ( LIN , 3 ) ENO
DISPLAY ( LIN , 33 ) ENAME
DISPLAY ( LIN , 62 ) DES
COMPUTE LIN = LIN + 2.
IF ( N3 = 9 )
DISPLAY ( 23 , 50 )" PRESS ANY KEY TO CONTINUE"
ACCEPT ( 23 , 79 )X WITH AUTO-SKIP
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 3 , 3 ) "EMPLOYEE NUMBER"
DISPLAY ( 3 , 33 ) "EMPLOYEE NAME"
DISPLAY ( 3 , 62 ) "DESIGNATION"
COMPUTE N3 = 1
COMPUTE LIN = 5.
IF ( EOF = "E" AND N3 = 0 )
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 12 , 20 )" EMPLOYEES ARE NOT PRESENT [OK] :"
DISPLAY ( 23 , 37 ) " CONTINUE[Y/N] :"
COMPUTE N3 = N3 + 1.
PARA-28.
PERFORM PARA-12.
ACCEPT ( 7 , 22 ) S WITH PROMPT EMPTY-CHECK.
OPEN INPUT EMPFILE.
OPEN OUTPUT ETMPFILE.
MOVE "Y" TO EOF.
MOVE 1 TO N3.
IF ST2 NOT= "30"
PERFORM PARA-29 UNTIL EOF = "E"
ELSE
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 10 , 25 ) "EMPLOYEES ARE NOT PRESENT"
"..[OK]"
ACCEPT ( 10 , 55 ) X WITH AUTO-SKIP
CLOSE EMPFILE ETMPFILE
GO TO PARA-21.
CLOSE ETMPFILE , EMPFILE.
OPEN INPUT ETMPFILE.
OPEN OUTPUT EMPFILE.
MOVE "Y" TO EOF.
MOVE 0 TO N3.
PERFORM PARA-30 UNTIL EOF = "E".
CLOSE ETMPFILE , EMPFILE.
MOVE "Z" TO X.
MOVE 23 TO LIN.
MOVE 64 TO COL.
PERFORM PARA-36 UNTIL X = "Y" OR X = "N".
      IF ( X = "Y")
       GO TO PARA-28.
GO TO PARA-9.
PARA-30.
READ ETMPFILE AT END MOVE "E" TO EOF.
IF ( EOF NOT= "E" )
COMPUTE N3 = N3 + 1
MOVE N3 TO ENO1
WRITE EMP FROM ETMP.
   PARA-29.
      READ EMPFILE RECORD AT END MOVE "E" TO EOF.
IF ( EOF NOT= "E")
IF ( ENO = S )
DISPLAY ( 9 , 22 ) ENAME
DISPLAY ( 11 , 22 ) ADD1
DISPLAY ( 12 , 22 ) ADD2
DISPLAY ( 13 , 22 ) ADD3
DISPLAY ( 15 , 22 ) PNO
DISPLAY ( 17 , 22 ) DES
DISPLAY ( 19 , 22 ) DNUM
MOVE SAL TO S3
DISPLAY ( 7 , 64 ) S3
MOVE HRA TO S3
DISPLAY ( 9 , 64 ) S3
MOVE DA TO S3
DISPLAY ( 11 , 64 ) S3
MOVE GROS TO S3
DISPLAY ( 13 , 64 ) S3
DISPLAY ( 15 , 64 ) DNAM
MOVE "Z" TO X
MOVE 23 TO LIN
MOVE 23 TO COL
PERFORM PARA-36 UNTIL X = "Y" OR X = "N
COMPUTE N3 = 0
IF ( X NOT= "Y" )
WRITE ETMP FROM EMP
ELSE
NEXT SENTENCE
ELSE
WRITE ETMP FROM EMP.
IF ( EOF = "E" AND N3 NOT= 0 )
DISPLAY ( 1 , 1 ) ERASE
DISPLAY ( 12 , 20 )" NO SUCH NUMBER EXISTS [OK] :"
DISPLAY ( 23 , 45 ) " CONTINUE[Y/N] :"
COMPUTE N3 = N3 + 1.
PARA-31.
DISPLAY ( 1 , 1 ) ERASE .
DISPLAY ( 3 , 3 ) " DATE :" DD1.
DISPLAY ( 4 , 3 ) " KAKINADA.".
DISPLAY ( 9 , 25 ) " OUR SINCIERE THANKS TO KuGuNi "
       "DEGREE COLLEGE FOR ".
DISPLAY ( 11 , 3 ) "PROVIDING THE REQUIRED LAB FACILITY "
       " AND LECTURERS , LAB ASSISTANTS WHO HELPED ".
DISPLAY ( 13 , 2 ) " IN DOING THIS PROJECT. ".
DISPLAY ( 17 , 45 ) " FROM ".
      DISPLAY ( 19 , 50 ) " PROJECT GROUP MEMBERS. ".
STOP RUN.
PARA-40.
ACCEPT DD FROM DATE.
MOVE CORR DD TO DD1.
PERFORM PARA-34.
DISPLAY ( 10 , 32 ) " HELP MENU ".
DISPLAY ( 11 , 31 ) " -----------".
DISPLAY ( 13 , 25 ) " ABOUT DATA MANAGER : 1".
DISPLAY ( 15 , 25 ) " FUNCTION KEYS : 2".
DISPLAY ( 17 , 25 ) " EXIT TO MAIN MENU : 3".
DISPLAY ( 19 , 25 ) " ENTER YOUR CHOICE[1/2]:".
MOVE 19 TO LIN.
MOVE 50 TO COL.
MOVE 5 TO NUM.
PERFORM PARA-35 UNTIL NUM NOT < 0 AND NUM < 4.
ACCEPT ESC FROM ESCAPE KEY.
GO TO PARA-31 PARA-40 PARA-0 PARA-9 PARA-21 PARA-2 PARA-1
PARA-22 PARA-24 PARA-26 PARA-10 DEPENDING ON ESC.
IF NUM = 0
GO TO PARA-40.
GO TO PARA-42 PARA-41 PARA DEPENDING ON NUM.

PARA-41.
DISPLAY ( 1 , 1 ) ERASE.
DISPLAY ( 2 , 3 ) "FUNCTION KEYS:".
DISPLAY ( 3 , 3 ) "=============".
DISPLAY ( 4 , 17 ) "WHEN THE USER IS WELL WITH THE D"
"ATA MANAGER SOFTWARE, HE WILL".
DISPLAY ( 5 , 3 ) "FIND SOME DIFFICULTY OR DISCOMFORT"
" WITH THE MENUS. A GOOD SOFTWARE MAKES THE".
DISPLAY ( 6 , 3 ) "USER AS COMFORTABLE AS POSSIBLE.FOR"
" THIS EACH AND EVERY FUNCTION KEY ASSAIGNED".
DISPLAY ( 7 , 3 ) "A SPECIFICED FUNCTION TO WORK ON AT"
" ANY MENU LEVEL.".
DISPLAY ( 9 , 20 ) " FUNCTION KEY WORK".
DISPLAY ( 10 , 20 ) "-------------- -----".
DISPLAY ( 12 , 25 ) " F1 HELP MENU".
DISPLAY ( 13 , 25 ) " F1 DEPARTMENT MENU".
DISPLAY ( 14 , 25 ) " F3 EMPLOYEE MENU".
DISPLAY ( 15 , 25 ) " F4 VIEW EMPLOYEE ME"
"NU".
DISPLAY ( 16 , 25 ) " F5 VIEW DEPARTMENT"
" DETAILS".
DISPLAY ( 17 , 25 ) " F6 ADD DEPARTMENT "
"DETAILS".
DISPLAY ( 18 , 25 ) " F7 VIEW EACH EMPLO"
"YEE DETAILS".
DISPLAY ( 19 , 25 ) " F8 VIEW EMPLOYEE "
"DETAILS DEPARTMENT WISE".
DISPLAY ( 20 , 25 ) " F9 VIEW ALL EMPLOY"
"EES".
DISPLAY ( 21 , 25 ) " F10 ADD EMPLOYEE "
"DETAILS".
DISPLAY ( 22 , 25 ) " ESC EXIT".
DISPLAY ( 24 , 46 ) "press any key to go to help menu"
"..".
ACCEPT ( 24 , 79 ) X WITH AUTO-SKIP.
GO TO PARA-40.
PARA-42.
DISPLAY ( 1 , 1 ) ERASE.
DISPLAY ( 2 , 34 ) " DATA MANAGER ".
DISPLAY ( 3 , 34 ) "==============".
DISPLAY ( 6 , 22 ) "A SOFTWARE WHICH MAINTAINS SOME IMPO
"RTANT EMPLOYEE DETAILS ".
DISPLAY ( 8 , 3 ) "BELONGING TO VARIOUS DEPARTMENTS OF"
" A PARTICULAR ORANIZATION AND MAKES USER AS".
DISPLAY ( 10 , 3 ) "COMFORTABLE AS POSSIBLE IN RETRIEWIN
"G THE INFORMATION IS KNOW AS DATA MANAGER ".
DISPLAY ( 11 , 68 ) "------------".
DISPLAY ( 13 , 3 ) "HOW TO USE DATA MANAGER :".
DISPLAY ( 14 , 3 ) "========================".
DISPLAY ( 16 , 26 ) " MAIN MENU " .
DISPLAY ( 17 , 26 ) " ----------- ".
DISPLAY ( 18 , 26 ) "DEPARTMENT DETAILS : 1".
DISPLAY ( 19 , 26 ) "EMPLOYEE DETAILS : 2".
DISPLAY ( 20 , 26 ) "HELP MENU : 3".
DISPLAY ( 21 , 26 ) "EXIT APPLICATION : 4".
DISPLAY ( 22 , 26 ) "ENTER YOUR CHOICE[1/2/3]: ".
DISPLAY ( 24 , 50 ) "press enter key to continue..".
DISPLAY ( 24 , 3 ) "press Esc key skip help.." .
ACCEPT ( 24 , 79 ) X WITH AUTO-SKIP.
ACCEPT ESC FROM ESCAPE KEY.
IF ESC = 1
GO TO PARA-40.
DISPLAY ( 4 , 1 ) ERASE.
DISPLAY ( 4 , 3 ) "1.ENTER 1 TO GO TO DEPARTMENT SUB-"
"MENU".
DISPLAY ( 5 , 3 ) "2.ENTER 2 TO GO TO EMPLOYEE SUB-"
"MENU".
DISPLAY ( 6 , 3 ) "3.ENTER 3 TO GO TO HELP MENU".
DISPLAY ( 7 , 3 ) "4.ENTER 4 TO EXIT FROM SOFTWARE".
DISPLAY ( 12 , 27 ) " DEPARTMENT SUB-MENU ".
DISPLAY ( 13 , 27 ) " ---------------------".
      DISPLAY ( 14 , 27 ) "ADD DEPARTMENT DETAILS : 1".
      DISPLAY ( 15 , 27 ) "VIEW DEPARTMENT DETAILS : 2".
DISPLAY ( 16 , 27 ) "DELETE DEPARTMENT DETAILS : 3".
DISPLAY ( 17 , 27 ) "EXIT TO MAIN MENU : 4".
      DISPLAY ( 18 , 27 ) "ENTER YOUR CHOICE[1/2/3/4]: ".
DISPLAY ( 20 , 3 ) "1.ENTER 1 TO ADD DEPARTMENT DETAI"
"LS ".
DISPLAY ( 21 , 3 ) "2.ENTER 2 TO VIEW DEPARTMENT DETAI"
"LS ".
DISPLAY ( 24 , 50 ) "press enter key to continue..".
DISPLAY ( 24 , 3 ) "press Esc key skip help.." .
ACCEPT ( 24 , 79 ) X WITH AUTO-SKIP.
ACCEPT ESC FROM ESCAPE KEY.
IF ESC = 1
GO TO PARA-40.
DISPLAY ( 4 , 1 ) ERASE.
DISPLAY ( 6 , 3 ) "3.ENTER 3 TO DELETE DEPARTMENT"
" DETAILS ".
DISPLAY ( 7 , 3 ) "4.ENTER 4 TO GO TO MAIN MENU".
DISPLAY ( 9 , 25 ) " EMPLOYEE SUB-MENU".
DISPLAY ( 10 , 25 ) " -------------------".
DISPLAY ( 11 , 25 ) "ADD EMPLOYEE DETAILS : 1".
      DISPLAY ( 12 , 25 ) "MODIFY EMPLOYEE DETAILS : 2".
      DISPLAY ( 13 , 25 ) "VIEW EMPLOYEE DETAILS : 3".
      DISPLAY ( 14 , 25 ) "DELETE EMPLOYEE DETAILS : 4".
      DISPLAY ( 15 , 25 ) "EXIT TO MAIN MENU : 5".
DISPLAY ( 16 , 25 ) "ENTER YOUR CHOICE[1/2/3/4/5] : " .
DISPLAY ( 18 , 3 ) "1.ENTER 1 TO ADD DEPARTMENT DETAI"
"LS".
DISPLAY ( 19 , 3 ) "2.ENTER 2 TO MODIFY DEPARTMENT DE"
"TAILS".
DISPLAY ( 20 , 3 ) "3.ENTER 3 TO GO TO VIEW SUB MENU".
DISPLAY ( 21 , 3 ) "4.ENTER 4 TO DELETE DEPARTMENT"
" DETAILS".
DISPLAY ( 22 , 3 ) "5.ENTER 5 TO GO MAIN MENU".
DISPLAY ( 24 , 50 ) "press enter key to continue..".
DISPLAY ( 24 , 3 ) "press Esc key skip help.." .
ACCEPT ( 24 , 79 ) X WITH AUTO-SKIP.
ACCEPT ESC FROM ESCAPE KEY.
IF ESC = 1
GO TO PARA-40.
DISPLAY ( 4 , 1 ) ERASE.
DISPLAY ( 7 , 25 ) " VIEW SUB-MENU".
DISPLAY ( 8 , 25 ) " ---------------".
DISPLAY ( 9 , 25 ) "VIEW AN EMPLOYEE DETAIL : 1".
DISPLAY ( 10 , 25 ) "VIEW DEPARTMENT WISE : 2".
DISPLAY ( 11 , 25 ) "VIEW ALL EMPLOYEE : 3".
DISPLAY ( 12 , 25 ) "EXIT TO SUBMENU : 4".
DISPLAY ( 13 , 25 ) "ENTER YOUR CHOICE[1/2/3/4]: ".
DISPLAY ( 15 , 3 ) "1.ENTER 1 TO VIEW EACH EMPLOYEE".
DISPLAY ( 16 , 3 ) "2.ENTER 2 TO VIEW DEPARTMENT WISE".
DISPLAY ( 17 , 3 ) "3.ENTER 3 TO VIEW All EMPLOYEE".
DISPLAY ( 18 , 3 ) "4.ENTER 4 TO GO TO EMPLOYEE MENU".
DISPLAY ( 24 , 46 ) "press any key to go to help menu"
"..".
ACCEPT ( 24 , 79 ) X WITH AUTO-SKIP .
GO TO PARA-40.

Courtesy, Source, References & Regards: Kishore

While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright@2009-2011 by KuGuNi.com. All Rights Reserved.