
JOIN
Discussion
The
JOIN
command
allo
ws
the
retriev
al
and
rep orting
of
data
item
v
alues
from
m
ultiple
data
sets
b
y
creating
a
logical
relation
b et
w
een
data
sets.
The
relation
is
established
b
y
equating
a
data
item
from
one
set
with
a
data
item
from
a
second
data
set.
These
data
item
equiv
alences,
of
whic
h
QUER
Y
allo ws
up
to
52,
dene
a
comp ound
data
set.
Once
y
ou
ha
v
e
dened
a
comp ound
data
set
with
the
JOIN
command,
y
ou
m
ust
en
ter
a
MUL
TIFIND
or
a
MUL
TIFIND
ALL
command
to
actually
create
the
comp ound
data
set
and
access
the
desired
items.
Refer
to
the
MUL
TIFIND
or
MUL
TIFIND
ALL
commands
in
this
man
ual
for
details
on
their
op eration.
Y
ou
can
only
rep ort
from
those
data
sets
used
in
the
JOIN
command.
A
JOIN
command
will
remain
in
eect
un
til
another
JOIN
command,
v
alid
or
in
v
alid,
is
en
tered.
Eac
h
subsequen
t
JOIN
command
also
clears
the
previous
select
le.
F
or
example,
supp ose
y
ou
w
an
t
to
make
a
sales
rep ort
that
sho
ws
information
from
four
data
sets:
the
name
of
the
pro duct,
the
quan
tit
y
sold
of
that
pro duct,
the
quan
tity
on
hand,
and
the
date
of
sale.
T
o
access
all
this
information,
dene
y
our
data
base
with
a
DEFINE,
D
A
T
A
BASE=,
or
MUL
TIDB
command
and
en
ter
the
JOIN
command.
> JOIN
PRODUCT.STOCK#
TO
SALES.STOCK#,&
>>
SALES.STOCK#
TO
INVENTORY.STOCK#
> MULTIFIND
PRODUCT.DESCRIPTION
=
NAIL
USING
SERIAL
READ
2
COMPOUND
ENTRIES
QUALIFIED
In
order
for
the
JOIN
command
to
b e
v
alid,
all
data
sets
used
in
the
JOIN
command
m
ust
b e
logically
connected
to
one
another
so
that
eac
h
data
set
is
traceable
to
ev
ery
other
data
set
through
the
data
item
equiv
alences.
If
logical
connections
cannot
b e
traced
b et
w
een
data
sets,
the
follo wing
message
is
returned
and
the
JOIN
do es
not
take
place.
LOGICAL
CONNECTIONS
ARE
INCOMPLETE,
COMPOUND
DATA
SET
CANNOT
BE
GENERATED
In
the
example
ab o
v
e,
the
data
set
SALES
is
common
to
b oth
PR
ODUCT
and
INVENTOR
Y,
and
a
data
equiv
alence
is
formed
with
the
data
item
STOCK#.
Ho
w
ev
er,
the
data
items
that
link
the
data
sets
need
not
ha
v
e
the
same
name
or
b e
of
the
same
data
t
yp e.
The
MUL
TIFIND
PR
ODUCT.DESCRIPTION=NAIL
command
created
the
comp ound
data
set
from
whic
h
retrieved
en
tries
can
b e
rep orted.
T
o
pro duce
a
sales
rep ort
for
the
NAIL
pro duct,
y
ou
can
en
ter
the
REPOR
T
command
with
the
desired
header
and
detail
statements
from
y
our
terminal
or
y
ou
can
use
a
pro cedure
le.
The
REPOR
T
command
is
sho
wn
on
the
next
page.
> REPORT
SALESPROC,A
REPORT
H1,"Report
on
Sales",43,SPACE
A2
H2,"Stock",7
H2,"Product",24
H2,"Quantity",39
H2,"Quantity",56
H2,"Date",70
H3,"No.",7
H3,"Description",24
H3,"Sold",39
QUERY/V
COMMANDS
3-57
Summary of Contents for QUERY
Page 10: ......
Page 17: ...Figure 1 1 ORDERS Data Base Structure Figure 1 2 Sample Entry Values INTRODUCING QUERY V 1 7 ...
Page 20: ...Figure 1 3 IMAGE QUERY Environments 1 10 INTRODUCING QUERY V ...
Page 36: ......
Page 165: ...REPORT G1 GROUP TITLE 11 END QUERY V COMMANDS 3 129 ...
Page 199: ...XEQ TF TOTAL DUE 9 SPACE B2 SKIP A TF R0 70 E2 S PURCH DATE END QUERY V COMMANDS 3 163 ...
Page 200: ......
Page 244: ......
Page 278: ......
Page 279: ...G ASCII CHARACTER SET This appendix is not available in this edition ASCII CHARACTER SET G 1 ...
Page 280: ......