IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.

ENVIRONMENT DIVISION.
   INPUT-OUTPUT SECTION.
   FILE-CONTROL.
   SELECT STUDENT ASSIGN TO OUT1
      ORGANIZATION IS SEQUENTIAL
      ACCESS IS SEQUENTIAL
      FILE STATUS IS FS.

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

   WORKING-STORAGE SECTION.
   01 WS-STUDENT.
      05 WS-STUDENT-ID PIC 9(5).
      05 WS-NAME PIC A(25).
      05 WS-CLASS PIC X(3).

PROCEDURE DIVISION.
   OPEN EXTEND STUDENT.
      MOVE 1000 TO STUDENT-ID.
      MOVE 'Tim' TO NAME.
      MOVE '10' TO CLASS.
      WRITE STUDENT-FILE
      END-WRITE.	
   CLOSE STUDENT.
STOP RUN.
