<s>
SQL	B-Language
Processor	O
Using	O
File	O
Input	O
is	O
a	O
database	O
facility	O
invented	O
by	O
IBM	O
for	O
interfacing	O
with	O
their	O
Db2	B-Application
system	O
.	O
</s>
<s>
It	O
is	O
accessed	O
from	O
within	O
TSO	B-Application
ISPF	B-Operating_System
from	O
the	O
DB2I	O
Primary	O
Option	O
menu	O
.	O
</s>
<s>
SPUFI	B-Application
allows	O
direct	O
input	O
of	O
SQL	B-Language
commands	O
in	O
the	O
TSO	B-Application
environment	O
,	O
rather	O
than	O
having	O
them	O
embedded	O
within	O
a	O
program	O
.	O
</s>
<s>
Once	O
set	O
up	O
the	O
SPUFI	B-Application
defaults	O
are	O
unlikely	O
to	O
be	O
changed	O
.	O
</s>
<s>
Enter	O
the	O
following	O
to	O
control	O
your	O
SPUFI	B-Application
session	O
:	O
</s>
<s>
Output	O
data	B-Application
set	I-Application
characteristics	O
:	O
</s>
<s>
Although	O
it	O
is	O
essentially	O
an	O
interactive	O
tool	O
,	O
SPUFI	B-Application
operates	O
using	O
a	O
pair	O
of	O
datasets	B-Application
.	O
</s>
<s>
In	O
the	O
main	O
SPUFI	B-Application
screen	O
one	O
specifies	O
an	O
input	O
dataset	O
and	O
an	O
output	O
dataset	O
;	O
these	O
can	O
be	O
specified	O
once	O
and	O
then	O
reused	O
repeatedly	O
.	O
</s>
<s>
When	O
the	O
user	O
moves	O
on	O
from	O
the	O
main	O
screen	O
,	O
the	O
standard	O
ISPF	B-Operating_System
editor	O
is	O
opened	O
on	O
the	O
input	O
dataset	O
.	O
</s>
<s>
At	O
this	O
point	O
the	O
user	O
can	O
enter	O
the	O
required	O
SQL	B-Language
statements	O
using	O
the	O
familiar	O
editor	O
.	O
</s>
<s>
On	O
exiting	O
from	O
the	O
editor	O
the	O
main	O
SPUFI	B-Application
screen	O
reappears	O
;	O
when	O
the	O
user	O
moves	O
on	O
this	O
time	O
the	O
contents	O
of	O
the	O
input	O
dataset	O
are	O
executed	O
.	O
</s>
<s>
The	O
results	O
are	O
placed	O
in	O
the	O
output	O
dataset	O
and	O
the	O
ISPF	B-Operating_System
editor	O
is	O
opened	O
(	O
in	O
read-only	O
"	O
browse	O
"	O
mode	O
)	O
on	O
that	O
output	O
.	O
</s>
<s>
Interactive	O
use	O
of	O
SPUFI	B-Application
continues	O
around	O
these	O
steps	O
;	O
in	O
summary	O
the	O
cycle	O
is	O
:	O
</s>
<s>
Because	O
SPUFI	B-Application
uses	O
normal	O
datasets	B-Application
for	O
the	O
commands	O
and	O
the	O
output	O
,	O
it	O
is	O
possible	O
to	O
pre-populate	O
the	O
commands	O
or	O
operate	O
on	O
the	O
output	O
by	O
accessing	O
the	O
datasets	B-Application
independently	O
of	O
the	O
SPUFI	B-Application
tool	O
.	O
</s>
<s>
Using	O
datasets	B-Application
also	O
means	O
that	O
a	O
possibly-complicated	O
set	O
of	O
SQL	B-Language
commands	O
will	O
persist	O
from	O
session	O
to	O
session	O
rather	O
than	O
being	O
lost	O
when	O
the	O
user	O
exits	O
the	O
tool	O
.	O
</s>
<s>
The	O
Output	O
dataset	O
contains	O
the	O
resultant	O
rows(in case of SELECT )	O
along	O
with	O
additional	O
details	O
like	O
number	O
of	O
rows	O
affected	O
by	O
the	O
SQL	B-Language
query	O
,	O
SQLCODE	O
returned	O
on	O
execution	O
of	O
the	O
SQL	B-Language
query	O
.	O
</s>
<s>
In	O
case	O
of	O
any	O
SQL	B-Language
errors	O
the	O
details	O
about	O
the	O
error	O
will	O
be	O
given	O
.	O
</s>
