The C correlative is used to concatenate attributes or literals, or both.
Format
C expression1 C expression2 [C expression3…] |
Parameter(s)
C |
A character that separates concatenated elements. Any nonnumeric character except a semicolon is a valid separator, including a blank. A semicolon (;) indicates that no separator is to be used. |
expression |
Specifies each element to be concatenated. An expression can be either an attribute number; any literal string enclosed in single or double quotes (' or ") or backslashes (\); or an asterisk (*). An asterisk specifies the result generated by a previous conversion or correlative operation. |
Description
Attributes in expressions can be specified only by attribute number; they cannot be specified by name.
Any number of expressions and separation characters can be included in any order.
When the Attribute Definition item of the attribute containing the C correlative is set up in the file dictionary, the attribute number (line 2) should be zero. If any other attribute number is used and the attribute specified contains a null value, the concatenation is not performed.
Using the C Correlative
In the table below, attribute 1 refers to a person’s first name and Attribute 2 refers to the last name. This correlative provides the person’s full name with last name first and first name last:
Code |
Result |
C2,1 |
MORRIS,STEVEN |
A comma is used as the separation character.
In the table below, a C correlative is used to build a part number from the three pieces of data contained in attributes 3, 2, and 4:
Code |
Result |
C"AZ"3-2-4 |
AZ250-35-1002 |
The table below shows more examples of how the C correlative can be used. The item referenced contains the data:
001 KANE 002 MIKE 003 514 004 MANAGER 005 COMMUNICATIONS 006 N/L 007 N/B 008 M3270 |
0 indicates a space character.
Code |
Result |
C1 , 2 |
KANE,MIKE |
C1 ; ' ,à ' ; 2 |
KANE,MIKE |
C " EXTà " ; 3 |
EXT 514 |
C1 ; \ , " \ ; 4 ; ' OF ' ; 5 " |
KANE, "MANAGER OF COMMUNICATIONS" |
See Also