Label Assignment

Speaker Notes

Slide 1:

This presentation will discuss some of the things to consider when creating the labels.

Slide 2:

Note that professionally you might be using paper that can support 132 characters so you would probably be doing 4-up labels instead of the 2-up labels we are doing here.

Slide 3:

In COBOL, I would set these up as 4 lines in the working storage section. If I were doing it, I would make a filler at the beginning for the spaces. I would have the slot occur 2 times and then I would have a filler at the end for the spaces. If I did not want spaces in the middle, I would make the occurs have a picture of X(30). If I wanted 5 spaces in the middle, I would make the slots X(35) so the first occurs would pick up the 5 spaces in the middle and the last occurs would pick up 5 of the spaces at the end.

I say this because when I have written 4 up labels I definitely did it this way and the occurs 4 times made the code easier.

Note that if you have an odd number of labels to create then the last set of labels has the right label empty.

Slide 4:

The identification number is created by concatenating the id with the zip with the extracted first character of the first name with the first character of the last name and the last character of the last name (converted to upper case).

Slide 5:

The approach suggested applies easily in COBOL. In VB or Oracle or C++ you will probably rely on concatenation..

Note that when you flip the name without a title, SUBOUT or something similar started with a 1. Now, SUBOUT would start with the number extracted from the table/array.

Note that the name flip itself is handled in a different presentation.

Note that in COBOL if the work area is described with a name and PICX(30) the title can be moved directly to that area. Then the redefinition which gives you character by character access can be used when you start to move in the name.

Slide 6:

Note that in the data, there are missing street numbers, street numbers with leading zeros and street numbers with leading spaces. Note that the street name may contain embedded spaces.

Slide 7:

Note that there can be embedded spaces in the city name so you must account for this in your processing.

Slide 8:

I would recommend that you write the code for one element of the program at a time. For example get a identification number on every label. Then get a name on every label. Then a street address on every label and finally a city, state and ZIP on every label.