Label Assignment

Write a program to read a file containing the following information:

Position

Field

1 - 4

Identification Number

5 - 6

Title Code

7 - 31

Name (Format: Last/First Middle)

32 - 36

Street Number

37 - 56

Street Name

57 - 58

Street Type

59 - 78

City

79 - 80

State

81 - 85

ZIP

The information for the title is:

Title Code

Title

1

Mr

2

Mrs

3

Mr & Mrs

4

Ms

5

Miss

6

Dr

7

Dr & Mrs

99 or blank

Title Unknown

The first line of the label must be blank.

The second line of the label must contain the id code with is the ZIP code concatenated with the id number concatenated with the first character of the first name concatenated with the first character of the last name.

The third line of the label must show the name with no extra spaces between parts.

The fourth line of the label must have the street address with number (if one exists), followed by a space, then street name, then a space, then street type. The number must not include leading spaces or leading zeros and the first digit of the number must be in the left most character of the line. If there is no street number, the street name must start in the leftmost character.

The fifth line of the label must contain the city up against the left wall, followed by a comma and a space followed by the state. The ZIP must be in the rightmost five characters of the line.

The sixth line of the label must be blank.

The labels are each 30 characters wide and 6 lines deep. The labels should be printed two across (2-up). Since there are

You must write this code using commands that manipulate the data one character at a time (the technique we used in flipping the name during class and lab). You may not use the STRING/UNSTRING or a comparable command sequence if you use another language.