You can check and control the status of join structures with three commands, CHECK FILE, ? JOIN query, and JOIN CLEAR. |
In this section: Example: |
The CHECK FILE command produces a diagram of host and cross-referenced relationships and retrieval paths. CHECK FILE also reloads the Master File and checks the Master File syntax.
To display the structure, at the FOCUS command level type
CHECK FILE name PICT[URE] [RETRIEVE] [HOLD] [JOIN]
where:
On the diagram, labels for non-unique (KM) or unique (KU) next to the cross-referenced structure indicate whether the dynamic JOIN is non-unique or unique. Only the first four fieldnames of each structure display.
The letter K next to a field indicates that it represents the foreign key column or the first column of a composite foreign key. If the cross-referenced structure has descendants, the descendants are labeled as either KL (keyed through linkage) or KLU (keyed through linkage unique), depending on how their relationship was declared to FOCUS.
join emp_id in empinfo tag file1 to all who in course tag file2 as j1
check file empinfo pict
NUMBER OF ERRORS= 0
NUMBER OF SEGMENTS= 2 ( REAL= 1 VIRTUAL= 1 )
NUMBER OF FIELDS= 13 INDEXES= 0 FILES= 2
TOTAL LENGTH OF ALL FIELDS= 95
SECTION 01
STRUCTURE OF GNTINT FILE EMPINFO ON 06/19/90 AT 12.17.40
EMPINFO
01 S0
**************
*EMP_ID **
*LAST_NAME **
*FIRST_NAME **
*HIRE_DATE **
* **
***************
**************
I
I
I
I COURSE
02 I KM
..............
:CNAME ::
:WHO ::K
:GRADE ::
:YR_TAKEN ::
: ::
:............::
.............:
JOINED COURSE
Note: "JOINED COURSE" indicates that this relationship was created by a dynamic JOIN command rather than a multi-segment Master File.
For all dynamic joins that are in effect, the ? JOIN query command identifies the fields representing the primary/foreign key field pair, the host structure, the cross-referenced structure, any specified join name, the type of join (non-unique or unique, as indicated by the presence or absence of the ALL keyword), and whether the join is conditional.
To list all active dynamic join structures, enter:
? JOIN
For example:
? join
JOINS CURRENTLY ACTIVE
HOST CROSSREFERENCE
FIELD FILE TAG FIELD FILE TAG AS ALL WH
----- ---- --- ----- ---- --- -- --- --
PAYEID PAYINFO P1 EMP_ID EMPINFO E1 Y Y
Note: The ? JOIN query command displays only the first join pair for multi-field joins.
A maximum of 16 dynamic joins can be active in any FOCUS session. The JOIN CLEAR command can release either all or specific existing joins. The syntax is
JOIN CLEAR {*|joinname}
where:
The effect of the JOIN CLEAR command depends on whether conditional joins exist:
The JOIN CLEAR * command clears every join that was issued along with its associated virtual fields. However, virtual fields defined in the null context (prior to any joins) remain in effect.
Information Builders |