Question
PROBLEM SCENARIO A file is to be created from data entered at the keyboard. The file (to be called STUDENT FILE) will contain student records
PROBLEM SCENARIO
A file is to be created from data entered at the keyboard. The file (to be called STUDENT FILE) will contain student records (STUDENT RECORD). Refer to Record Structure and Process Requirements below for details
NOTE
The file name in the program will be called STUDENT-FILE.
The file name as saved in permanent memory ( N drive, memory stick etc.) will be called STUFILE.DAT or STUFILE.TXT
The record name in the program will be called STUDENT-RECORD.
For the field names, use the names noted in the Record Structure below following proper COBOL coding rules. Abbreviations are acceptable as long as they are meaningful
Record Structure (STUDENT-RECORD)
Each record will contain the following fields (attributes) in this order.
Student Name 20 bytes alphameric
Student Number 9 bytes alphameric
Course Number 7 bytes alphameric
Program ID 7 bytes alphameric
Process Requirements
Once a record has been entered at the keyboard it is to be written to an external file. Please note, as this file is to be a stored data file for other processing, there should be no spacing or any form of editing. The output record will follow exactly the same structure and sequence as that for the input described above.
Each time through the loop, the program should prompt whether another record is to be entered and if so, prompt for each of the 4 fields to be entered. Please note the prompt whether a record is to be entered should be executed in the Initiation and Mainline routines.
Refer to Screen Layout Requirements below for prescribed screen layout for prompts and data entry positions. Refer to Test Data below for the records to be entered. You must use the test data provided in the Test Data below.
To view or print the created file, use NOTEPAD, or WORDPAD and retrieve the file.
Screen Layout Requirements
Prompt column line Response column line
RECORD TO ENTER | 5 | 5 | Y or N | 5 | 6 |
ENTER NAME | 5 | 8 | Student name | 5 | 9 |
ENTER NUMBER | 5 | 10 | Student number | 5 | 11 |
ENTER COURSE | 5 | 12 | Course number | 5 | 13 |
ENTER PROGRAM | 5 | 14 | Program ID | 5 | 15 |
Test Data
This is the test data to be used when you run your program. You must use this data.
Jones, John | 123456789 | CST8283 | COMPSCI |
Smith, Bill | 234567890 | CST2234 | COMPPRG
|
---------------------------------------------------------------------------------------------------------------------------------------------------------- Only looking for dump of output file (use Notepad or WordPad to access and print the file created by this program).
Step 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