Question: COBOL PROGRAMMING: The program should read in the attached file: USPRES.TXT and load the records into a president table. The Month Table program had an

COBOL PROGRAMMING:

The program should read in the attached file: USPRES.TXT and load the records into a president table. The Month Table program had an OCCURS 12 TIMES clause, and this program will need 45, as the US has had 45 presidents. The sequence number is 2 characters, and the longest President Name, I believe is 25 characters.

Then the program will prompt the user for a sequence number and will then return the name of that President.

So the prompt will say something like: WHICH PRESIDENT DO YOU WANT TO KNOW (01 - 45)?

The program will return the number and the name.

The program will "loop" until the user types in an "X" to quit.

The program should display the program name and your name.

Save the program as HW19FL.cbl

Extra Credit Opportunity (20 pts): Change the prompt to allow a "List All" function, like LA to have the program display all 45 presidents.

USPRES.TXT:

01George Washington 02John Adams 03Thomas Jefferson 04James Madison 05James Monroe 06John Quincy Adams 07Andrew Jackson 08Martin Van Buren 09William H. Harrison 10John Tyler 11James K. Polk 12Zachary Taylor 13Millard Fillmore 14Franklin Pierce 15James Buchanan 16Abraham Lincoln 17Andrew Johnson 18Ulysses S. Grant 19Rutherford B. Hayes 20James A. Garfield 21Chester A. Arthur 22Grover Cleveland 23Benjamin Harrison 24Grover Cleveland 25William McKinley 26Theodore Roosevelt 27William H. Taft 28Woodrow Wilson 29Warren G. Harding 30Calvin Coolidge 31Herbert Hoover 32Franklin D. Roosevelt 33Harry Truman 34Dwight D. Eisenhower 35John F. Kennedy 36Lyndon B. Johnson 37Richard M. Nixon 38Gerald R. Ford 39James E. Carter 40Ronald Reagan 41George Bush 42William Jefferson Clinton 43George Bush 44Barack Obama 45Donald Trump

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!