
F
USER-DEFINED
PROCEDURES
Procedures
This
app endix
do cumen
ts
a
feature
of
the
QUER
Y
subsystem
whic
h
is
used
primarily
b
y
the
programmer
or
data
base
administrator.
QUER
Y
allo
ws
y
ou
to
sp ecify
y
our
o
wn
pro cedure(s)
whic
h
will
enable
a
rep ort
to
read
or
write
from
another
data
base,
data
set,
or
le,
mo
dify
registers,
or
p erform
other
sp ecialized
tasks
not
pro
vided
b
y
QUER
Y.
The
name
of
the
user-dened
pro cedure
cannot
b e
the
name
of
an
y
data
item
in
the
data
sets
referenced
b
y
the
retriev
al
command.
User-dened
pro cedures
can
b e
called
from
either
a
header,
group,
total,
or
detail
statement
within
the
REPOR
T
command,
and
can
b e
written
in
SPL,
COBOL,
F
OR
TRAN
or
P
ASCAL.
Note
that
programming
errors
in
user-dened
pro cedures
will
cause
QUER
Y
to
terminate.
The
pro cedure
m
ust
b e
stored
in
one
of
the
segmen
ted
libraries.
These
libraries
are
searc
hed
in
the
follo wing
order:
group
account
system
T
o
call
y
our
dened
pro cedure,
replace
the
prin
t
elemen
t
with
the
name
of
the
pro cedure,
and
replace
the
prin
t
p osition
with
a
slash
(/).
Sev
en
teen
parameters
are
automatically
passed
to
the
pro cedure
b
y
QUER
Y.
Y
ou
may
pro
vide
a
single
in
teger
parameter
for
eac
h
pro cedure.
T
o
sp ecify
a
v
alue
for
a
particular
call
of
the
pro cedure,
the
v
alue
should
b e
placed
in
paren
thesis
after
the
name
of
the
pro cedure.
r
ep
ort
statement
typ
e,pr
o
c
e
dur
e
name
[( user
p
ar
ameter)],/,[ statement&
p
ar
ameter]
The
follo wing
statement
parameters
are
allo
w
ed
with
a
REPOR
T
statement
con
taining
a
call
to
a
user-dened
pro cedure:
SPACE
A
SPACE
B
SKIP
A
SKIP
B
F
or
example:
REPORT
H1,PROC1(5),/,SPACE
A3
H1,ITEM3,50
D1,PROC2,/
D1,ITEM1,10
D2,ITEM2,10
END
The
follo wing
is
not
allo
w
ed:
USER-DEFINED
PROCEDURES
F-1
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: ......