Presentation is loading. Please wait.

Presentation is loading. Please wait.

Label Assignment Please use speaker notes for additional information!

Similar presentations


Presentation on theme: "Label Assignment Please use speaker notes for additional information!"— Presentation transcript:

1 Label Assignment Please use speaker notes for additional information!

2 2-up 123402043JDE 234502771SDS Mr John Doe Sally Davis 12 Elm St 45 East Main St Hingham, MA 02043 Seekonk, MA 02771 248902781MFY 567602184DFD Dr Mary Foley Dick Field 3 Heritage Rd 35 West St Fall River, MA 02781 Braintree, MA 02184 Note that the sample labels above are 2-up which means there are two labels written together. We will assume that the labels are 6 lines deep and 30 characters across. Since I am writing 4 lines of information, I will leave the 1st and 6th lines blank. The print line can support 80 characters. I am using 60 characters for the labels. In need to account for the other 20. You would do this by looking at the labels that you buy to run, for our purposes you can leave spaces in front, between, after or just in front and after. You decide on the layout.

3 Labels To process, you need to read a record and set up the label and then read another record and set up the label. When both labels are setup you can write. Note that you will be writing two ids when you write the id line and two names when you write the name line etc. I suggest that you consider setting up four output line with two slots on each line. You should also set up one or more work areas to use in manipulating the data. For example, when you are setting up the name you need to have a work area to hold the name after it is flipped. Then, I would take that flipped name and move it to the name output line. If this is the first record, the name goes in the first slot of the name line. If this is the second record, the name goes in the second slot of the name line. If this is the third record, the previous two need to be written and then the name gets set up in the first slot of the name line. spaces slot for name 1 (30 chars) spaces possibly slot for name 2 (30 chars) spaces spaces slot for id 1 (30 chars) spaces possibly slot for id 2 (30 chars) spaces spaces slot for csz 1 (30 chars) spaces possibly slot for csz 2 (30 chars) spaces spaces slot for adr 1 (30 chars) spaces possibly slot for adr 2 (30 chars) spaces

4 Labels 1234020431234JDE 234502771SDS Mr John Doe Sally Davis 12 Elm St 45 East Main St Hingham, MA 02043 Seekonk, MA 02771 ID: 1234 Title: 1 Name: Doe/John St Number: 00012 St Name: Elm St Type: St City: Hingham State: MA ZIP: 02043

5 Label Mr 4 Mrs 5 Mr & Mrs 8 Possible way to handle the title if you are coding in COBOL - a table/array with two elements. The first element is the title itself and the second element is the character position where the first character of the first name should appear if there is a title. Title Where first character of first name should go. Note that an IF can omit an empty title or a title containing 99. Other titles and the information on where the first character of the first name should go can be extracted from the table/array.

6 Labels 123402043JDE 234502771SDS Mr John Doe Sally Davis 12 Elm St 45 East Main St Hingham, MA 02043 Seekonk, MA 02771 ID: 1234 Title: 1 Name: Doe/John St Number: 00012 St Name: Elm St Type: St City: Hingham State: MA ZIP: 02043 The street number must be stripped of its leading zeros so that the actual number aligns against the left wall.Then the street name and type must be concatenated with the number with one space between the parts.

7 Labels 123402043JDE 234502771SDS Mr John Doe Sally Davis 12 Elm St 45 East Main St Hingham, MA 02043 Seekonk, MA 02771 ID: 1234 Title: 1 Name: Doe/John St Number: 00012 St Name: Elm St Type: St City: Hingham State: MA ZIP: 02043 Note that comma comes directly after the street name. The city name should be followed by a comma and a space and then the state. The ZIP should appear in characters 26-30 so that it appears at the end of the label for ease of processing.

8 Labels Processing: You read a record and set it up and then read another record and set it up. After every two records you write. This means you need a counter to keep track of when to write. After you write, you need to clear out the output areas in preparation for the next two records. When EOF is reached, there may be a record left to right if there are an odd number of records in the file. This needs to be handled.


Download ppt "Label Assignment Please use speaker notes for additional information!"

Similar presentations


Ads by Google