Professional Documents
Culture Documents
Casestudy Approach
Casestudy Approach
Dep no
D01 Read Dep file
D02 if read successful write dept in output
D03 read emp file sequentially and check if department number is match
D04 if dep dep no = emp dep no
D05 read flat file seq and check if emp emp no is matching with flat file e
calculate salary
EMP file write output as per the report format
empno dep no employee details
111 D05
222 D04 D01 D02 D04 D05
333 D01
444 D02
555 D05
666 D02
Flat file
Empno Rate per hour
111
222
333
444
555
partment number is matching
each time emp file should be opened and closed
is matching with flat file emp no
employee details
pened and closed
DEP table
Dep no
D01
D02
D03
D04
D05
EMP table
empno dep no
333 D01 111 D05
444 D02 222 D04
666 D02 333 D01
Flat file
Empno Rate per hour
111
222
333
444
555
First cursor
Using cursor select dept column details
Second cursor
using cursor select emp details
order by dept no
Perform cursor1
Cursor1
open cursor1
perform fetch dep para until sqlcode = 100
close cursor1