Format:
relation relation-name primary to secondary-1 method
[to secondary-2 method] ... [to secondary-n method];
where method is
parallel | linked by arith-exp | where condition
Description:
The relation statement allows you define additional relations beyond those defined in the data dictionary.
The relation-name is a unique CSPro name which contains only letters, numbers, or the underscore ('_') character. It must begin with a letter.
The primary is the name of a multiply occurring record or item. Items defined as secondary are linked to the primary by the method specified.
The secondary is the name of a multiply occurring record or item which is linked to the primary.
The method type is specified by one of the keywords parallel, linked by, or where.
In the parallel method corresponding occurrences of the primary record or item and secondary record or item are linked, that is first occurrences are linked, second occurrences are linked and so on.
In the linked by method the value of the arithmetic expression containing values from one record item is a pointer to the occurrence in the other record or item.
In the where method the value of an item on the primary record is compared to the value of an item on the secondary record. If the values are equal, the records are linked.
Example 1:
PROC GLOBAL
relation PERSON POP1 to POP2 parallel
to POP3 parallel;
Example 2:
PROC GLOBAL
relation MOTHER-CHILD CHILD to MOTHER linked by MOTHER_LINE;
Example 3:
PROC GLOBAL
relation MOTHER-ALL PERSON to MOTHER
where PERSON_LINE = MOTHER_LINE;