write a program in a sequential data file "employee.rec" to display records those staff whose name start from "a" . please help me
Answers
Explanation:
. Write a program to create a sequential data file “RESULT.DAT” to store name, address and marks obtained in 3 different subjects of students. [PABSON SEND UP 2066]
- OPEN “RESULT.DAT” FOR OUTPUT AS #1
DO
CLS
INPUT “Enter name”; N$
INPUT “Enter address”; A$
INPUT “Enter marks in three different subjects”; M1, M2, M3
WRITE #1, N$, A$, M1, M2, M3
INPUT” Do you want to continue(Y/N)”;CH$
LOOP WHILE UCASE$(CH$)=”Y”
CLOSE #1
END
2. Write a program to search and display only those record whose percentage is more than 60% from the data “RESULT.DAT” which contain Student’s Symbol number, Date of birth, Total Marks, Percentage and Division. [PABSON SEND UP 2067]
- OPEN “RESULT.DAT” FOR INPUT AS #1
CLS
WHILE NOT EOF(1)
INPUT #1, SN, D$, T, P, DA$
IF P>60 THEN PRINT SN, D$, T, P, DA$
WEND
CLOSE #1
END
3. A data file name “STUDENT.DAT”, contains number of records having fields name, post and salary. Write a program to count total number of “Manager” in the data file. (hint: Manager is a post) [SLC SEND UP 2067]
- OPEN “STUDENT.DAT” FOR INPUT AS #1
CLS
WHILE NOT EOF(1)
INPUT #1, N$, P$, S
IF UCASE$(P$)=”MANAGER” THEN
C=C+1
END IF
WEND
PRINT “The total numbers of managers are”; C
CLOSE #1
END
4. WAP to create sequential file “Person.DAT” containing information like Name, age, DOB and sex. Add records in this data file as per the users choice. [PABSON SLC 2064]
- OPEN “PERSON.DAT” FOR OUTPUT AS #1
DO
CLS
INPUT” Enter name”; N$
INPUT” Enter age”; A$
INPUT” Enter date of birth”; D$
INPUT” Enter Sex”; S$
WRITE #1, N$, A$, D$, S$
INPUT “Do you want to continue(Y/N)”; CH$
LOOP WHILE UCASE$(CH$)=”Y”
CLOSE #1
END
5. Write a program to store SIDNO, name, address and Telephone number of five students and display the records on monitor in sequential data file “STDINFO”. [MAAF SLC SEND UP 2068]
- OPEN “ STDINFO.DAT” FOR OUTPUT AS #1
DO
CLS
INPUT “Enter SID NO. “; N
INPUT “Enter name”; N$
INPUT “Enter address”; A$
INPUT “Enter telephone number”; T#
WRITE #1, N, N$, A$, T#
INPUT “Do you want to continue(Y/N)”; CH$
LOOP WHILE UCASE$(CH$)=”Y”
CLOSE #1
END
SRYYY THAT IS WAS TOOO LENTY BUT IT IS THE EXACT ANSWER OF UR QUESTION
ND PLSSSS SUPPORT MEEE