Label Assignment

Write a program to read a file containing the following information and create 2-up labels:

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 labels are each 30 characters wide and 6 lines deep. The labels should be printed two across (2-up).

The first line of the label must be blank.

The second line of the label must contain the id code which is the id number concatenated with the ZIP code concatenated with the first character of the first name concatenated with the first character of the last name concatenated with the last character of the last name (converted to uppercase).

The third line of the label must show the name with no extra spaces between parts. The name must include the title unless the title code is 99 or blank. If there is no title, the name must start in the left most character of the line.

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 (if one exists). 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 or the rightmost 10 if you use a 10 character zip.

The sixth line of the label must be blank.

I will provide a list of the data - you need to prepare the data file and write the program in the language of your choice.