        IDENTIFICATION DIVISION.
        PROGRAM-ID. test.
        AUTHOR. ALBERTO AYALA.

	ENVIRONMENT DIVISION.
		INPUT-OUTPUT SECTION.
			FILE-CONTROL.
			SELECT STUDENT ASSIGN TO 'input.txt'
			ORGANIZATION IS LINE SEQUENTIAL.

	CONFIGURATION SECTION.
	INPUT-OUTPUT SECTION.

	DATA DIVISION.
	FILE SECTION.
	FD STUDENT
	01 STUDENT-FILE.
		05 STUDENT-ID PIC 9(5).
		05 NAME PIC A(25).

	WORKING-STORAGE SECTION.
	01 WS-STUDENT.
	05 WS-STUDENT-ID PIC 9(5).
	05 WS-NAME PIC A(25).
	01 WS-EOF.
	
	PROCEDURE DIVISION.
	OPEN INPUT STUDENT.
	PERFORM UNTIL WS-EOF='Y'
	READ STUDENT INTO WS-STUDENT
		AT END MOVE 'Y' TO WS-EOF
		NOT AT END DISPLAY WS-STUDENT
	END-READ.
	END-PERFORM.
	CLOSE STUDENT.
		
	STOP RUN.
