Question
My program that I have so far: IDENTIFICATION DIVISION. PROGRAM-ID. JohnsonBA2. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT REGISTRATION-MASTER ASSIGN TO 'registrations.dat' ORGANIZATION IS LINE SEQUENTIAL.
My program that I have so far:
IDENTIFICATION DIVISION. PROGRAM-ID. JohnsonBA2. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT REGISTRATION-MASTER ASSIGN TO 'registrations.dat' ORGANIZATION IS LINE SEQUENTIAL. SELECT REMINDER-NOTICES ASSIGN TO 'JohnsonBA2.RPT' ORGANIZATION IS LINE SEQUENTIAL. DATA DIVISION. FILE SECTION. FD REGISTRATION-MASTER. 01 IN-STUDENT-REC. 05 IN-STUDENT-ID PIC X(9). 05 IN-STUDENT-NAME. 10 IN-FIRST-NAME PIC X(15). 10 IN-MIDDLE-INITIAL-NAME PIC X(1). 10 IN-LAST-NAME PIC X(15). 05 DATE-OF-BIRTH. 10 DOB-YEAR PIC 9(4). 10 DOB-MONTH PIC 9(2). 10 DOB-DAY PIC 9(2). 05 IN-MAILING-ADDRESS. 10 IN-ADDRESS1 PIC X(20). 10 IN-ADDRESS2 PIC X(20). 10 IN-CITY PIC X(15). 10 IN-STATE PIC X(2). 10 IN-ZIP PIC X(9). 05 IN-ACADEMIC-PROGRAM PIC X(20). 05 IN-ACADEMIC-LEVEL PIC X(20). 05 IN-CLASS PIC X(10). 05 IN-CREDITS-COMPLETED PIC X(5). 05 IN-DATE-LAST-ENROLLMENT. 10 IN-DOLE-YEAR PIC 9(4). 10 IN-DOLE-MONTH PIC 9(2). 10 IN-DOLE-DAY PIC 9(2). 05 SEND-NOTICE PIC 9(1). FD REMINDER-NOTICES. 01 OUT-NOTICES. 05 OUT-STUDENT-ID PIC X(9). 05 OUT-STUDENT-NAME. 10 OUT-FIRST-NAME PIC X(15). 10 OUT-MIDDLE-INITIAL-NAME PIC X(1). 10 OUT-LAST-NAME PIC X(15). 05 OUT-MAILING-ADDRESS. 10 OUT-ADDRESS1 PIC X(20). 10 OUT-ADDRESS2 PIC X(20). 10 OUT-CITY PIC X(15). 10 OUT-STATE PIC X(2). 10 OUT-ZIP PIC X(9). 05 OUT-DATE-LAST-ENROLLMENT. 10 OUT-DOLE-YEAR PIC X(4). 10 OUT-DOLE-MONTH PIC X(2). 10 OUT-DOLE-DAY PIC X(2). WORKING-STORAGE SECTION. 01 WS-WORK-AREAS. 05 MORE-RECORDS PIC X(1) VALUE "Y". PROCEDURE DIVISION. *100-MAIN-MODULE - CONTROLS OPENING AND CLOSING FILES *AND DIRECTION OF THE PROGRAM LOGIC; RETURNS CONTROL TO THE *OPERATING SYSTEM. 100-MAIN-MODULE. OPEN INPUT REGISTRATION-MASTER OUTPUT REMINDER-NOTICES PERFORM UNTIL MORE-RECORDS = "N" READ REGISTRATION-MASTER AT END MOVE "N" TO MORE-RECORDS NOT AT END PERFORM 200-REMINDER-NOTICES END-READ END-PERFORM CLOSE REGISTRATION-MASTER REMINDER-NOTICES STOP RUN. *200-REMINDER-NOTICES - PERFORMED FROM 100-MAIN-MODULE *CHECKS THE VALUE OF THE FIELD SEND-NOTICE AND WHEN IT IS "Y" *MOVES THAT REGISTRATION RECORD TO NOTICES AND WRITES RECORD. 200-REMINDER-NOTICES. * IF SEND-NOTICE = "Y" MOVE IN-STUDENT-ID TO OUT-STUDENT-ID MOVE IN-STUDENT-NAME TO OUT-STUDENT-NAME MOVE IN-MAILING-ADDRESS TO OUT-MAILING-ADDRESS MOVE IN-DATE-LAST-ENROLLMENT TO OUT-DATE-LAST-ENROLLMENT WRITE OUT-NOTICES. * END-IF.
Field Size Type STUDENT ID 9 Alphanumeric STUDENT NAME FIRST NAME 15 Alphanumeric MIDDLE INITIAL 1 Alphanumeric LAST NAME 15 Alphanumeric DATE OF BIRTH YEAR 4 Numeric MONTH 2 Numeric DAY 2 Numeric MAILING ADDRESS ADDRESS LINE 1 20 Alphanumeric ADDRESS LINE 2 20 Alphanumeric CITY 15 Alphanumeric STATE 2 Alphanumeric ZIPCODE 9 Alphanumeric ACADEMIC PROGRAM 20 Alphanumeric ACADEMIC LEVEL 20 Alphanumeric CLASS 10 Alphanumeric CREDITS COMPLETED 5 Alphanumeric DATE OF LAST ENROLLMENT YEAR 4 Numeric MONTH 2 Numeric DAY 2 Numeric SEND NOTICE 1 Alphanumeric REGISTRATION-MASTER Record Layout Figure 1: REGISTRATION-MASTER Record LayoutFigure 1: REMINDER-NOTICES Record Layout 1. Add a comment describing the purpose of the program. 2. The PROGRAM-ID section of the ENVIRONMENT DIVISION must be written as LastnameFirstinitialA2 (e.g., BasilioEA2). 3. Add comments to provide the required class identification information. Note: The checklist that will be used to evaluate this assignment can be found in the Course Documents section (A2Feedback.pdf). Field Size Type STUDENT ID 9 Alphanumeric STUDENT NAME FIRST NAME 15 Alphanumeric MIDDLE INITIAL 1 Alphanumeric LAST NAME 15 Alphanumeric MAILING ADDRESS ADDRESS LINE 1 20 Alphanumeric ADDRESS LINE 2 20 Alphanumeric CITY 15 Alphanumeric STATE 2 Alphanumeric ZIPCODE 9 Alphanumeric DATE OF LAST ENROLLMENT YEAR 4 Numeric MONTH 2 Numeric DAY 2 Numeric REMINDER-NOTICES Record Layout
dat registrati 914785236 MICHAEL 2 974125836 ERIC 3 951357456 PATRICIA 915935725 RYAN 94562583 2DANIEL 6 936925814 JOSHUA 7 931312526 BILLY 8 914151213 THOMAS 924265875CHRISTOPHER 998765418 SHIRLEY 10 AWILLIAMS P JOHNSON CSTEVENSON PDANIELS KKIRPATRICK LEWIS WAYNE BUILDER ACOLUMBUS WINSTON 197101151521 14TH STREET 196805024125 HAMILTON ROAD APT 65 19820712315 SOUTH HOPE 198709211200 MACK AVE #215 196511183000 12TH AVE 19780423300 NE 2ND AVE APT B-316 197506141100 US 231 19850805750 UNION AVE 1ST FLOOR 19921024750 COMMERCE DR 198909111400 ROSWELL RD COLUMBUS GA31901 BUSINESS UNDERGRADUATE COLUMBUS OH43230 ECONOMICS GRADUATE LOS ANGELES CA90071 MINAL JUSTICE UNDERGRADUATE MI48207 INFORMATION SYSTEMS UNDERGRADUATE DETROIT BIRMINGHAM AL35234 COMPUTER SCIENCE GRADUATE MIAM FL 33132 BUSINESS UNDERGRADUATE AL36081 INFORMATION SYSTEMS UNDERGRADUATE TROY MEMPHIS TN38103 BUSINESS GRADUATE GA 30030 COMPUTER SCIENCE UNDERGRADUATE DECATUR RIETTA GA30062 ECONOMICS UNDERGRADUATE JUNIOR 06050201201 10Y 1ST YEAR 0200020120801N SOPHN MORE 04500201207 15N JUNIOR 0955020100814 Y 2ND YEAR 04075201112 15Y SENIOR 13200 20120630N JUNIOR 085002012081 1N 1ST YEAR 0090020121 601N JUNIOR 10500201 20105Y SENIOR 1400020111115YStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started