Name Combination/Batch Usage

Easytrieve Plus

Some systems return names separated in pieces (first, middle, last, etc.), This utility will combine those fields into a single name field. It can combine the individual fields in one of two ways:

Normal order means that the combined name field will be in the following format (e.g., Mr. John Quincy Adams):

  1. Name Salutation (if it exists), e.g., Mr., Ms., etc.
  2. First Name
  3. Middle Name/Initial (if it exists)
  4. Last Name
  5. Comma (if a name suffix exists)
  6. Name Suffix (if it exists), e.g., Jr., Esq., etc.

Reversed order means that the combined name field will be in the following order (e.g., Adams, John Quincy):

  1. Last Name
  2. Comma
  3. First Name
  4. Middle Name/Initial (if it exists)
  5. Comma (if Name Suffix exists)
  6. Name Suffix (if it exists), e.g., Jr., Esq., etc.

Special order means that the combined name field will be in the following order (e.g., Adams/John/Quincy):

  1. Last Name
  2. Slash (/)
  3. First Name
  4. Slash (/)
  5. Middle Name/Initial (if it exists)

From an Easytrieve Plus program, this module is called using an Easytrieve Plus include as follows:

%IS9015B HPARM

where HPARM is a 162 byte field subdefined as follows:

  1. Name Salutation (e.g., Mr., Ms., etc.) -- 10 bytes/input
  2. First Name -- 30 bytes/input
  3. Middle Name/Initial -- 30 bytes/input
  4. Last Name -- 30 bytes/input
  5. Name Suffix (e.g., Jr., Esq.) -- 10 bytes/input
  6. Fully Combined Name -- 50 bytes/output
  7. Option/Return Code -- 1 byte/both input and output
  8. Middle Name/Initial Option -- 1 byte/input

The Option/Return Code field is used for both input and output. When used for input, it can have the following 2 values:

  1. N -- Normal Order (default)
  2. R -- Reversed Order
  3. S - Special Order

For output, it returns the status of the attempted name combination. It can take on the following values:

  1. 0 -- Routine Was Successul
  2. 1 -- All Name Fields Are Blank
  3. 2 -- Either First Name or Last Name Is Blank (Or Both)
  4. 3 -- The Routine Needed More Than 50 Bytes to Complete

If the return code is other than 0, the resulting combined name will be blank.

The Middle Name/Initial Option field can take on two values:

  1. I -- Use Only Middle Initial
  2. N -- Use Full Middle Name (default)

As can be seen from the return codes, only two input fields are required:

Any other fields which are blank are ignored.

An Easytrieve Plus INCLUDE called LIB9015B has the layout/variable definitions for the parameter fields.

  • No JCL changes are required to invoke this procedure.