In class work:
Your assignment is to fill in the picture clauses for the input STUDENT-FILE
and the field names and picture clauses where missing for the output STUDENT-REPORT.
This is not to be passed in, it is for your own practice. I will go over this in class, if
distance learning student want to pass it in to be checked they may do so.
The following program has a data file that has this description:
1 - 4 Student identification number
5 - 24 Student name
25 - 39 Student city
40 - 41 Student state
42 - 43 Student major
44 - 58 Student advisor
The data in the file is:
1234Jonathan M Davidson Fall River MACIGrocer
2345Susan Jones New Bedford MABUJennings-Taylor
3456David Lane Providence RICIArruda
4567Jennifer Ames Attleboro MACIVieira
5678Carl Hersey East ProvidenceRICISanford
6789Stephen Daniels Taunton MACIFerreira
7890Linda Anderson Middletown RICIGrocer
IDENTIFICATION DIVISION.
PROGRAM-ID. STUDENT.
AUTHOR. GROCER.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT STUDENT-FILE
ASSIGN TO "A:\C12first.DAT".
SELECT STUDENT-REPORT
ASSIGN TO "A:\out1.dat".
DATA DIVISION.
FILE SECTION.
FD STUDENT-FILE
DATA RECORD IS STUDENT-RECORD.
01 STUDENT-RECORD.
05 STU-ID
05 STU-NAME
05 STU-CITY
05 STU-STATE
05 STU-MAJOR
05 STU-ADVISOR
FD STUDENT-REPORT
DATA RECORD IS PRINTZ.
01 PRINTZ.
05 FILLER PIC X.
05 STU-ID-PR
05 FILLER PIC X(4).
05 FILLER PIC X(4).
05 FILLER PIC X(4).
05 FILLER PIC X(4).
05 FILLER PIC X(4).
05 FILLER PIC X(1).
WORKING-STORAGE SECTION.
01 INDICATORZ.
05 END-OF-FILE-IND PIC XXX VALUE "NO ".