Académique Documents
Professionnel Documents
Culture Documents
I. Use the empdata.doc. Here the ~ character is used as the field separator.
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. Give the command to display the employee first name, last name, employee code,
department code and grade from the file.
II. Create a file called trans.doc. The field separator is a blank character. The file consists
of the following fields:
Transaction Number, Customer Name, Customer Code, Product code of product sold,
Number of units sold, Rate per unit
2. Give the command to store the customer name, customer code and units sold to the
customer in a file called cust.dat
3.Give the command to display the first 5 fields from the file
4. Give the command to display all fields after the 2nd field.