Escolar Documentos
Profissional Documentos
Cultura Documentos
1. For the following exercises, the file empdata should be used. The fields in the file are as
follows:
Employee last name Starts with an upper case alphabet
Employee first name Starts with an upper-case alphabet
Employee code Numeric in the range 3000 3999
Permanent address In upper case and lower case
Department code Codes are RND, Accts, MKT
Grade Grades are E1, E2, S1, S2, M1, M2
Years of Experience Numeric, 1 or 2 digits
Date of Birth dd-mm-yy format
Basic Pay Numeric, 4 digits
1. Sort the file by Employee Last name and display the results on the VDU.
2. Sort the contents of the file by Dept code and store the contents in the same file.
3. Sort the contents of the file by Dept code and store the contents in a file called dept_wise.
5. Give the command to arrange the contents of the file in increasing order of Years of experience
and store the details in the file exp.dat.
6.Give the command to arrange the contents of the file in decreasing order of Years of experience
and display the details on the VDU.
7. Give the command to sort the file by Department code , within which by years of experience and
display the output on the screen.
8. Give the command to sort the file by reverse order of Grade within which by decreasing order of
Basic Pay and store the output in empdata.(empdatt).