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
- Reverse Order
- Special Order
Normal order means that the combined name field will be in the following
format (e.g., Mr. John Quincy Adams):
- Name Salutation (if it exists), e.g., Mr., Ms., etc.
- First Name
- Middle Name/Initial (if it exists)
- Last Name
- Comma (if a name suffix exists)
- 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):
- Last Name
- Comma
- First Name
- Middle Name/Initial (if it exists)
- Comma (if Name Suffix exists)
- 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):
- Last Name
- Slash (/)
- First Name
- Slash (/)
- 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:
- Name Salutation (e.g., Mr., Ms., etc.) -- 10 bytes/input
- First Name -- 30 bytes/input
- Middle Name/Initial -- 30 bytes/input
- Last Name -- 30 bytes/input
- Name Suffix (e.g., Jr., Esq.) -- 10 bytes/input
- Fully Combined Name -- 50 bytes/output
- Option/Return Code -- 1 byte/both input and output
- 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:
- N -- Normal Order (default)
- R -- Reversed Order
- S - Special Order
For output, it returns the status of the attempted name combination. It
can take on the following values:
- 0 -- Routine Was Successul
- 1 -- All Name Fields Are Blank
- 2 -- Either First Name or Last Name Is Blank (Or Both)
- 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:
- I -- Use Only Middle Initial
- 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.