Ibm - Sql-Data System General Information For Vm-System Product PDF
Ibm - Sql-Data System General Information For Vm-System Product PDF
Ibm - Sql-Data System General Information For Vm-System Product PDF
GH24-5064-1
zZ
f - M'
f; ■
g. ;
'.V .
SQL/Data System
General Information for
VM/System Product
Release 3.5
GH24-5064-1
Second Edition (November 1985)
This edition, GH24-5064-1, is a revision of GH24-5064^. This edition applies to the
Structured Query Language/Data System (SQL/DS,Program Ntimber 5748-XXJ)in
a VM/System Product(VM/SP)environment. This edition applies imtil otherwise
indicated in new editions or Technical Newsletters. Changes are periodically made
to the information herein. Before using this publication in connection with the
operation ofIBM systems, consult the latest IBM SyatemlSTO and 4300 Proceaaora
Bibliography, GC20-0001,for the editions that are applicable and current.
Summary of Changes
Changes or additions to the text and illustrations are indicated by a vertical line
to the left of the change.
In this manual are illustrations in which names are used. These names are fanciful
and fictitious; they are used solely for illustrative purposes and not for
identification of any person or company.
Ordering Publications
IBM Corporation
Department 6R1T
180 Kost Road
Mechanicsburg, Pennsylvania
U.S.A. 17055
IBM may use or distribute whatever information you supply in any way it believes
appropriate without incurring any obligation to you. \
(
O Copyright International Business Machines Corporation 1984,1985
\
Summary of Changes
The new facilities are either transparent or used only when requested. You
do not need to change your operating procedures if you do not use the new
facilities.
Technical enhancements have not affected all of the SQL/DS books. Only
the following SQL/DS for VM/SP books have been updated:
- Minor technical and editorial changes have also been included in these
^ r '\ manuals.
I
SQL/DS Release 3
This is a list of technical changes for Release 3 of SQL/DS that affected this
manual.
This facility keeps track of the amounts of system resources used by each
SQL/DS user and SQL/DS process. Installations can "charge" users for the
resources they consumed in the SQL/DS virtual machine.
Users can tell SQL/DS to periodically commit changes to the data base
while using the DBS utility to load data into a data base.
Performance Improvements
SQL/DS can interpret identifiers and character strings that contain both
DBCS and EBCDIC data.
This book is written for customer executives who are evaluating the
Structured Query Language/Data System (SQL/DS)for a VM/SP system and
deciding if it meets their needs. This book is also intended for anyone
interested in an overview of SQL/DS in a VM/SP system; for example, a
data base administrator, system programmer, operator, or general user.
For more details about the concepts of SQL/DS and the facilities SQL/DS
offers, refer to SQLIData System Concepts and Facilities for VMISP,
GH24-5065.
Preface V
VI SQL/Data System General Information for VM/SP
Contents
Highlights j
General Description 2
Using the Data Base ['] j
Querying Data
Writing Reports
Using Application Programs
Data Recovery g
Data Security g
Data Administration g
Productivity Increases g
End Users g
Application Programmers
Administrators g
Computer Operators ^[ g
Some Basics of SQL 7
Query Commands
Data Definition Commands 9
Data Manipulation Commands 1q
View and Authorization Commands 12
Using SQL/DS from a Terminal jg
Screen Format 2g
Program Function Keys Ig
Report Writer !.! . 17
Storing SQL Commands 27
Creating and Running Routines 28
Education 28
Using SQL/DS from an Application Program 19
SQL Conunands in Application Programs 29
Preprocessing the SQL Commands in an Application Program 21
Programmed Queries in an Application Program 22
Advantages of SQL/DS for Application Development 22
Planning Period 23
Design Phase !!! 23
Program Coding and Testing 23
Installing and Using the Application 24
Additional Features oe
Contents vil
Entering Data into SQL/DS 25
Data Types 25
Data Independence 26
Data Security 26
Data Recovery 27
Accounting 28
Data Base Services(DBS) Utility 28
Catalogs 29
Installation 39
Installation Planning 39
Installation Aids 39
Documentation 41
SQL/DS Library 41
Bill Of Forms(BOF) Numbers for Ordering Publications 43
Online Reference(HELP)Information 44
Sample Data Tables and Programs 44
Index 45
^ Figures IX
Highlights
General Description
The Structured Query Language/Data System (SQL/DS)is a relational data
base management system designed for both end users and data processing
professionals. With SQL/DS, any user can access data in interactive and
noninteractive systems.
The language for handling data is the Structured Query Language (SQL).
SQL commands can be entered firom a display terminal, used as input to the
utility program, or embedded in a program. Programs can be coded in
COBOL,PL/I, FORTRAN,or assembler language.
SQL/DS presents all data as tables. All data appears in row and column
format. This sample table has three rows and four colimins:
SQL/DS provides data base capability that is easy to use and easy to
administer. With little effort, a data base can be set up and end users can
begin to use SQL/DS almost immediately. In a development center
environment, SQL/DS provides data base capability for interactive, dynamic
use and supports changing requirements. It is a useful tool for modeling
data designs and developing uses of data.
Highlights 1
Querying Data
With many programming and data languages, you must code a long
sequence of instructions explaining how to get data, what to look for, and
what to do with it. In SQL/DS, you can do all this with one command.
Even better, you don't have to know how or where the data is stored. You
just have to know the names of the table and its columns.
SQL/DS lets users access data directly, using SQL commands, without the
need for a user-written program. Several users can access SQL/DS data at
the same time. They can query and update data or create reports while
other users and programs are working with other data in the same or
different tables. SQL/DS has facilities which resolve conflicting updates.
SQL commands can do many common data processing tasks, such as:
• Sort data.
Writing Reports
Users can store query commands along with format commands. Format
commands control how query results are displayed or printed. A user can
develop the format of a report at a terminal and then request a printed copy
of the query result seen at the terminal.
This query and report writing capability can replace some of the need for
special programs. Thus, SQL/DS users can have access to current data
quickly.
Archiving (copying data onto magnetic tape) can involve the entire data
base, or just the log of data base activity. Restoring involves copsring the
entire data base from tape and then applying the log archives (if any) and
the log.
SQL/DS also permits recovery using portions of the log and allows sections
of the data base to be disabled for user access. The recovery process is
controlled by the administrator of the data base.
Data Security
SQL/DS also enforces security measures. SQL/DS controls access to
SQL/DS and to data managed by SQL/DS. SQL/DS has a security audit
facility that records who is using SQL/DS and the access privileges and
authorities for each user.
Data Administration
A group of users can also be put in charge of the data base system. These
data base administrators control the system resources (for example the
data base itself, the users' data, etc.). In SQL/DS, there can be one data
administrator or many. SQL/DS does not require that one person be
appointed data administrator or a new group be set up to control SQL/DS.
Your installation can decide how much centralized data control it needs.
SQL/DS has catalogs which contain information on the data in the data
base, and each user's authority to access parts of that data. These catalogs,
which are part of SQL/DS, serve as an integrated data dictionary and
directory. They are dynamically updated to reflect the current status of the
data base. When a user defines a data base object(creates a table, for
Highlights 3
example), SQL/DS catalogs are automatically updated. The catalogs make
it easier to keep track of data stored in the system.
SQL/DS is normally run so that many users and programs can access
SQL/DS data at the same time. This is called multiple user mode. SQL/DS
can also run in single user mode when maximum performance on involved,
time-consuming activities is required. Such activities include loading large
quantities of data or working on complex queries that access large amounts
of data.
End Users
Users of SQL/DS (especially those who use just the query and report
writing facilities) need not have data processing training. The concepts of
tables and their uses are common ones, especially for people accustomed to
keeping records.
The simplicity of the SQL/DS data concept reduces the time and cost for
education. New users can learn about SQL/DS from the tutorial SQLjData
System Terminal User's Guide for VMjSP. Later they can use the
SQLjData System Terminal User's Reference for VMfSP manual. Or they
can display the online reference(HELP)information as they work at the
terminals.
The time needed to formulate and enter a query at the terminal is much less
than the total time needed to code and execute an equivalent one-time
programming request. Thus more timely information can be used in
decision making.
Application Programmers
Programmers can use SQL/DS interactively to satisfy one-time
programming requests without writing a program.
Productivity Increases 5
)
\
handling the data records. Therefore, programmers are free to work on the
logic of the programs. This can improve programmer productivity and
reduce the program backlog.
SQL and the data table concept reduce the burden on the programmer.
Because SQL is easy to use, the probability of SQL coding errors is low. If
an error is made, it is easy to detect and correct.
When it is time to revise the data base, programmers often don't have to
make extensive changes to their programs. Data restructuring may result
in little or no change to programs. Therefore, the data processing staff can
respond easily to changing business needs.
Administrators
Many adminisfrative decisions can be deferred until users have gained some
experience with an initial set of data tables. SQL/DS default parameters
can be used for initial operations. Later, after tiie system is better known
and its usage is established, the system can be adjusted to meet specific
goals. Adjustments can be made while the data is in use. Only major
changes require that SQL/DS be halted.
Computer Operators
SQL/DS requires a minimum of data processing expertise to support it.
Installing SQL/DS is straightforward. Operations scheduling is easy
because definition or change of one part of the data can be done while users
are working with other parts. There is little or no time lost for data
reorganization.
^ . I
6 SQL/Data System General Information for VM/SP
r
f
I
Some Basics of SQL
SQL is easy to use, not only for progrsanmers, but also for personnel who
are not involved with data processing. A person no longer has to leam
programming to store and maintain records on a computer system.
SQL lets people work with data without their having to leam a complex
storage format. SQL uses the same language structure for commands
entered at the terminal interactively, as for commands coded in a program.
A main use of SQL is in querjring stored data. SQL is also used for defining
data, manipulating data, and controlling access to data.
Note: Only basic aspects of SQL are shown in this book. For more about
SQL, refer to SQLfData System Concepts and Facilities for VMISP or
the tutorial SQLfData System Terminal User^s Guide for VMfSP.
Table: EMPLOYEES
Solution:
yields:
Note: The asterisk (")in the command denotes *'all columns** of the table.
Solution:
yields:
NAME TELEPHONE
ANDREWS, B. K. 2112
BOSWELL, T. U. 2211
HENRY, G. G. 2111
Solution:
yields:
SERIAL NAME
5846 ANDREWS, B. K.
6587 JOHNSON, A. V.
The basic data definition command is the CREATE TABLE command. The
command to create the EMPLOYEES table (Figure 1) is:
CREATE TABLE EMPLOYEES (SERIAL INTEGER,
NAME VARCHAR(20)
DEPARTMENT VARCHAR(10)
TELEPHONE INTEGER)
The CREATE TABLE command gives the name of the table, the name of
each column, and the type of data in each column. In this example, the
keyword VARCHAR, used for the NAME and DEPARTMENT columns,
means that these columns will hold character strings of varying lengths.
The numbers in parentheses tell how many characters can be in an entry in
those columns. The CREATE TABLE command does not put any data into
the table.
defines a new column named SALARY to the EMPLOYEES table. The data
in the SALARY column will be decimal numbers of up to 8 digits; 2 of those
digits will be to the right of the decimal point. The column now exists, but
all values in the new column are null. Null represents a value that is
unknown or not applicable. A null value is commonly represented in a
display by a question mark (?); however, users can change this
representation if they wish. The values will remain null until a user or a
program fills in the data by using the UPDATE command. A user who now
entered
would see:
A single command can affect multiple rows in a table. For example, the
command:
erases from the EMPLOYEES table all the rows for the Accounting
Department employees:
The following commands update the EMPLOYEES table with some salary
data:
A single command can affect only parts of multiple rows in a table. For
example, the command:
UPDATE EMPLOYEES SET SALARY = 1.15 * SALARY
WHERE DEPARTMENT = 'SALES
A simple use of CREATE VIEW and GRANT gives a user the authority to
display (but not change) part of a table. For example, the command:
CREATE VIEW SALESV AS SELECT NAME,SERIAL,TELEPHONE
FROM EMPLOYEES
WHERE DEPARTMENT='SALES'
defines a view named SALESV. It consists ofjust three columns firom the
EMPLOYEES table. The command:
User JOHNSON can display all the SALESV data as if it were a table by
using a query:
The query that user JOHNSON enters is thus simpler than it would be if
the query operated directly on the EMPLOYEES table. The query provides
just the data that user JOHNSON needs.
Any changes to the main table are reflected in the view. For example,
suppose ANDERSON'S phone number is changed in the EMPLOYEES table
as follows:
The next time user JOHNSON displays the SALESV data, it would look
like this:
SQL/DS lets a person work directly with data via an IBM 3270-type (or
equivalent) display terminal. By using a communication facility, several
users can use the same SQL/DS system. For more information, refer to
"Relationships with Other IBM Products" on page 31.
Besides SQL commands, SQL/DS has another set of commands that make
working at a terminal easy. These commands are directed to the
Interactive SQL Facility (ISQL), which controls the terminal session. ISQL
commands are for:
ISQL also has format commands to control how results are shown at the
terminal and printed in reports. For example, column names can be
changed, subtotals and totals can be shown, and report titles can be
specified.
SQL/DS lets a user store any SQL command for repeated use. The user
defines a name for each stored SQL command, and later uses this name
to start each execution.
A user can keep format controls with any stored query so that when
that query is executed, the format of the result is as desired. A user can
develop the format for a report and then save both the query and the
format controls for repeated use.
Output Area
Input Area
I Status Area
The input area is two lines, minus the characters used for the status area.
Where color display terminals are available, the user can de£me both color
gjld highlight characteristics for the ISQL screen format.
• User-defined (or default) titles for the top and bottom of each page.
The user specifies the name under which the SQL command is stored. The
user can then recall a stored SQL command and use it just as it was stored;
or the user can recall a stored SQL command, change it, and then use it.
(ISQL commands are used to store, recall, change, and execute the SQL
command.)
SQL commands can be stored with places reserved for values that aa*e
different each time the commands are executed. For example, suppose the
following query (for the EMPLOYEES table in Figure 1)is stored as
NAMETELE:
The stored query can then be used many times, with a different value for &1
each time. For example:
Education
The program places the part number of interest into variable ZZ before
executing the SELECT command. The SELECT command gets the two
fields DESCRIPTION and QUANTITY fi:om the INVENTORY record for a
certain PARTNUMBER (ZZ).
207 GEAR 75
209 CAM 50
221 BOLT 650
222 BOLT 1250
231 NUT 700
232 NUT 1100
241 WASHER 6000
285 WHEEL 350
295 BELT 85
PL/I Example:
COBOL Example:
DATA DIVISION.
WORKING-STORAGE SECTION.
EXEC SQL BEGIN DECLARE SECTION END-EXEC,
77 XX PICTURE X(24).
77 YY PICTURE S9(9) COMPUTATIONAL.
77 ZZ PICTURE S9(9) COMPUTATIONAL.
PROCEDURE DIVISION.
FORTRAN Example:
Note: PL/I, COBOL, and Assembler language programs can also be coded using the
"DECLARE-OPEN-FETCH-CLOSE" format required for the FORTRAN programs.
SQL commands can also be embedded in APL2 programs. APLZ provides its
own interface to SQL/DS and dsmamically executes SQL commands(much
like ISQL). SQL/DS, itself, does not provide an APL2 preprocessor.
A preprocessor verifies that the user has the authority to access the
SQL/DS data used in the program. A preprocessor also updates the SQL/DS
catalogs. This gives the user who preprocessed the program the privilege of
using the access module. (That user can then grant this privilege to
others.) SQL/DS also includes an Extended Dynamic Command facility.
This facility provides for precompiled access to SQL/DS for preprocessing
SQL commands. This allows programmers to write their own language
preprocessors, application development programs, and other tools.
There are two Isolation Level options that specify whether other users can
update data that the program has finished reading. Isolation Level Cursor
Stability can improve performance for programs running in multiple-user
mode. Isolation Level Repeatable Read offers extra protection against
updates for data used by the program.
If these options are chosen carefully for the program during preprocessing,
performance will improve when the program is run. ISQL and Data Base
Services(DBS) utility users can also specify Isolation Levels. The DBS
utility is discussed on page 28.
Application programs that carry out planned queries use system resources
more efficiently than unplanned queries issued from a terminal. The
programmed SQL commands are preprocessed only once, but they are run
many times. Each program run then does not involve the computations
needed to interpret an unplanned query.
New programs and tables can be installed at any time. SQL/DS has no
generation requirements for adding new applications or changing old
ones.
End users are familiar with data shown in rows and columns. An
application designer does not have to translate computer data storage
structures into forms the end user can understand. Thus the planner
can work directly with the familiar row and column format and avoid
misunderstandings with the end user.
Planners can use ISQL or the DBS utility to create prototjrpe tables,
load them with sample data, and show sample application usage. End
users can then see the proposed scheme in operation before it is coded.
Such a protot5rpe can save both computer time and people time. Design
flaws can be more easily corrected at this early phase.
Design Phase
Programmers can test SQL commands via terminals before they put
them into a program, without affecting existing data.
Programmers can load tables, compile programs, and test the programs
while SQL/DS is in operation. They can use terminals to display data
changes made by the programs.
Multiple users can share test tables. Program development and testing
can be done concurrently by different users using a common test data
base.
• Terminal users can insert single or multiple rows of data via the
Interactive SQL(ISQL)facility.
Data Types
SQL/DS supports ten types of data. All data in SQL/DS tables must be one
of these types. All data in a column must be of the same type.
• The DBCS data types support character sets that require two bjrtes of
storage for each character in the character set. Kanji is one example of
such a character set. DBCS data can also have a fixed number of
characters or a varying number of characters.
Additional Features 25
Data Independence
Having data in SQL/DS tables gives terminal users and programmers the
freedom to ignore details concerning physical data storage. Users and
programs are thus free of data storage details.
Each user or program then works with a portion or view of the data in the
tables. As new needs arise, new columns may have to be added to the
existing tables. But the users and the existing program a not concerned
with the new needs are not afrected.
Data independence means that users and programmers do not have to spend
time changing their methods and programs just because data elements they
do not need have been modified. They can work on the new needs of the
business.
Data Security
SQL/DS enforces security measures to limit data access to authorized users
or programs. Each user is defined to SQL/DS in terms of a user
identification (userid), a password, and level of authority. Users must first
log on to the VM/SP system with a system identifier (userid) and password.
SQL/DS then uses this information to determine proper user access. The
user's level of authority determines the user's freedom in using SQL/DS. At
a typical installation:
Users can grant to others the privileges of working with the data or
programs that they control. Granting and revoking of privileges is done by
using SQL commands. For example, the creator of a table can authorize ^
another user to work with only certain rows or columns of that table. The
creator can limit the type of work that others may do on that table; for
example, usage can be limited to query(SELECT command) activity.
SQL/DS and DB2 are both relational data base management systems. They
both use SQL, and are broadly compatible. DB2 operates in Multiple
Virtual Storage(MVS)environments.
The compatibility of DB2 and SQL/DS permits the use of SQL data base
managers in establishments that have multiple systems. For example, an
establishment might choose to operate a central MVS system running DB2,
with additional VSE or VM/SP systems running SQL/DS.
Data Extract(DXT)
DXT is a tool for extracting data from hierarchical or sequential files (such
as an IMS data base, VSAM files or SAM files).. When DXT is used to
extract data from other sources, the output can be passed directly to the
SQL/DS DBS utility to load that data into an SQL/DS data base.
System Design
System design can be seen as physical design, data design, and methods
design. Physical design is largely capacity planning. Data design deals
with creating the tables. Methods design is planning how the system will
be used so that data security, data integrity, and data recovery needs are
met. These aspects are all related to one another.
Physical Design
• How many users will there be? How many of them will use SQL/DS at
the same time?
Questions like these should be answered in terms of the initial system and
needs in the near future.
A key element in the physical planning is defining the online storage spaces
to be used by SQL/DS. At the start, the SQL/DS data base only contains
information about its ultimate limits. These limits can reflect a data base
Data Design
Designing the formats of the tables entails answering questions such as:
• How can the data be placed in tables so that it can be used easily?
Which tables will be used together?
Methods Design
Methods design involves planning how users will interact with SQL/DS.
Such planning entails dealing with SQL/DS both as a whole and as a
collection of separate data tables. Different methods will be needed for
different situations. Questions in this area are:
• Which users will access online data? How will they use the data
(create, update, delete, select only)? What authority limits should be
placed on each user?
As with other aspects of SQL/DS initial answers to questions like these can
be changed without major impact to daily operations.
IBM provides aids for installing the SQL/DS code suid generating the
starter data base.
Installation Planning
Note the hardware and software cited under "Requirements of SQL/DS" on
page 33.
Installation Aids
SQL/DS has internal default values so that installing and starting the
system can be done with minimal effort. SQL/DS can be used with the
default values until plans are set for changing them to meet local needs. It
is recommended that you use the SQL/DS starter data base allocations and
specifications for your initial SQL/DS data base.
Installation 39
r
IBM provides:
SQL/DS Library
The SQL/DS library for VM/SP contains the items listed in Figure 5.
Note: Not all SQLfDS publications have been updated for Release 3.5. In
Figure 5, the * by the order number of a publication indicates that it
has been updated for Release 3.5.
SQL/DS Order In
Title Number Purpose EOF
Documentation 41
r
SQL/DS Order In
Title Number Purpose EOF
Terminal User^s Guide SH24-5045 Is a tutorial on basic uses of SQL and ISQL YES
for VMISP commands in VM/SP. This guide is for all
beginning users of SQL/DS (end users and
programmers). Readers need not be data
processing professionals. The guide includes
exercises that can be done at a terminal or on
paper.
Terminal User's SH24.5067 Is for terminal users who have completed the YES
Reference for VMfSP Guide. DBS utility users can also reference this
book for information on SQL commands. This
reference book documents the SQL and ISQL
commands in alphabetic order.
Terminal User's 8X24-5142 Summarizes the formats of the ISQL and SQL YES
Reference Summary commands commonly used at a terminal.
for VMISP
Program Function SX24-5143 Fits around the program function keys of an IBM NO
Key Template for 3270 terminal. It is a memory aid for the ISQL
VMjSP functions set into those keys.
Application SH24-5068 Is the guide and reference book for programmers YES
Programming for using SQL. This book presents a complete
VMISP description of all SQL commands.
Data Base Services SH24-5069 Is a guide and reference manual for users of the YES
Utility for VMISP Data Base Services.(DBS)utility program.
Messages and Codes SH24-5070* Explains each SQL/DS message and completion YES
r
for VMISP code. Each explanation includes the action the
receiver is to take when that message or code
occurs.
Operation for VMISP SH24-5071* Explains how to control SQL/DS via commands YES
&om the system operator's console.
Licensed Program GH24-5066* Defines the warranty criteria for SQL/DS. NO
Specifications for
VMISP
Diagnosis Guide for SY24-5230* Provides information on diagnosing functional and YES
VMISP performance problems.
Diagnosis Reference SY24-5232* Provides reference information on the internal YES
for VMISP working of SQL/DS for use in problem diagnosis.
Master Index for SH24.5072* Consolidates the indexes of the preceding manuals YES
VMISP into one so that a reader can find which manuals
discuss various topics.
r-'
SBOF-3239
In Figure 5, the column "In BOF" indicates if that item is included in Bill
Of Forms SBOF-3239, which can be used to simplify ordering of this set of
items. Ordering one SBOF-3239 is the same as ordering one of each of the
items indicated. This BOF number is now included in the IBM System
Library Subscription Service (SLSS), thus providing for automatic
distribution of any updates to items in the BOF.
SBOF-3240
An additional BOF number is now available for ordering binders for the
SQL/DS publications. Ordering one SBOF-3240 is the same as ordering
these items;
Persons wishing to learn SQL should start with the tutorial Terminal UseFs
Guide for VMfSP. They can then go on to either the Terminal User's
Reference for YMfSP or the Application Programming for VMfSP manual.
SQL/DS is also available for a VSE system. The SQL/DS library for a VSE system is similar to
this library. Refer to SQLjData System General Information for VSE, GH24-5012, for details.
Documentation 43
r
Online Reference(HELP)Information
IBM has copied reference information &om two manuals {Terminal User's
Reference for VM/SP and Messages and Codes for VMfSP)and has
formatted this information for terminal display via ISQL at SQL/DS
terminals. This information (supplied with the SQL/DS code) is provided as
SQL/DS tables. It can be changed or supplemented to meet local needs.
CMS HELP files are also available to provide online reference information
for commonly used SQL/DS EXECs.
routines 18
0
abnormal termination 27
access to SQL/DS data 15
accounting iv, 28
administration of data 3,6, 37 DASD Dump Restore(DDR)facility 27
administration, general 38 data administration 3,6
advantages of SQL/DS for application data base
development 22 usage of 1
aids for installation 39 data base administrator(DBA)authority 26
aids provided by IBM 39 Data Base Edit Facility(DBEDIT) 34
ALTER TABLE command 10 data definition
APL2 21,34 commands 9
application development 22 data design 38
application programs 5, 21 data dictionary 3, 29
description and usage 2,19 Data Extract(DXT) 35
archiving 3, 27, 33 data independence 26
Assembler 19, 34 data manipulation
asterisk (*) used in SELECT command 8 commands 10
authority 26 data recovery 3, 27
authorization 12, 26 data security 3, 26
data types 25
DBS(Data Base Services) utility 28, 35
commit point restart iv, 28
0 summary of processing 28
DBSPACE 26
DB2 data base management system 35
backing out DELETE command 10
changes 27 design considerations 23
basics of SQL 7 displaying
bill of forms(BOF)niunbers for ordering online reference information 15
publications 43 dociunentation overview 41
blocking iv, 22 Double-Byte Character Set(DBCS)data 25
dynamic
backout of a program 27
0
catalog tables 29 E
general description
character data 25
EBCDIC data 25
CMS 32,33 education 18
Help facility 44 end users 5
COBOL 19,34 enhancements for national languages iv
color display terminals 16 enhancements in Release 3.5 iii
commit point restart iv enhancements to SQL for Release 3 iv
computer operators 6 entering
CONNECT authority 26 data in a table 25
CREATE TABLE command 9
environments 31, 32
CREATE VIEW command 12
extended dynamic statements 22
creating
Index 45
r
0 M
H
0
HELP text 5,15,44 online reference information 5,15, 44
highlights 1 operations 6
a 0
IBM DATABASE 2(DB2) 35 performance management 23, 24
Information Center/1 (IC/1) 34 improvements in SQL/DS Release 3 IV
Information Management System (IMS) 36 PF keys 16
insert blocking iv physical design of a data base 37
INSERT command 10 PL/I 19,34
installation planning for SQL/DS 37, 39
of applications 24 planning program development 23
planning 39 preprocessing 21
tape drive requirements 33 privileges 26
interactive program development environment 32 productivity increases 5
isolation level iv, 22 program
ISQL (Interactive Structured Query Language) 15, coding and testing 23
32 development environment 32
function(PF)keys 16
sample 44
programmed queries 5, 22
0 programming options 33
programming requirements 33
prototyping 23
library of SQL/DS manuals iv, 41
publication changes for Release 3.5 iii
log 27
publications for products related to SQL/DS
logging 27
publications overview 41
0 commands
ALTER TABLE 10
CREATE TABLE 9
query commands 8 CREATE VIEW 12
Query Management Facility(QMF) 32, 34, 36 DELETE 10
querying GRANT 12
data 2
INSERT 10
tables through a view 12 REVOKE 12
SELECT 8
UPDATE 10
general description 1
R
library of publications iv, 41
publications updated for Release 3.5 iii
real storage summary of changes
requirements 33 for Release 3 iv
recovery 3 for Release 3.5 iii
of data 27 system
related products 35 design considerations 37
Relational Design Tool(RDT) 34 system catalogs 3, 29
report writing 17 System Library Subscription Service (SLSS) 43
reports 2,15,17
requirements of SQL/DS 33
resource authority 26
REVOKE command 12
revoking privileges &om others 26
0
routines 18
table
RSCS Networking 33, 34 column 1
running row 1
routine 18 sample 44
terminal, display 15
tracing 33
a
sample u
procedures 39
programs 44 UPDATE command 10
tables 44 user exit for accounting data 28
SBOF-3239 43 using
SBOF-3240 43 application programs 2, 19, 24
screen 16
data base 1
security of data 3, 26 SQL/DS from a terminal 15
SELECT command
basic idea 8
single user mode 31
some basics of SQL 7
SQL/Edit 34
starter data base 39
stored routines 18 views 12
stored SQL command 15,17 VM/SP 33
storing VM/SP-Entry 33
commands 15,17 VM/SP High Performance Option(HPO) 33
Structured Query Language/Data System (SQL/DS) VMBACKUP Management System 27, 34
Index 47
r
w Numerics
III""
II"" I
0
to
1 ;ii; I
CM
X
o
nil I
• IBM Virtual Machine/System Product-Entry (VM/SP-Entry), Release 1
or later
In this manual, the term "VM/SP" is used to refer to any one of these
operating systems.
For remote printing via ISQL, one of these products (or an equivalent
non-IBM product) is required:
The following optional IBM products can also be used with SQL/DS:
Machine Requirements
Additional real storage is needed for the IBM program products associated
with SQL/DS and any other products and application programs in the
environment.
SQL/DS will work with these products and following versions, releases, and
modification levels unless otherwise stated.
□ SQL/DS
DATA
BASE
□
This figure shows two virtual machines communicating with SQL/DS at the same time.
Another interactive data query and report writing product that runs with
SQL/DS is the Query Management Facility (QMF). For an overview of
QMF, refer to the IBM manual Query Management Facility: General
Information, GC26-4071. Other optional products are listed under
"Programming Requirements and Options" on page 33.
Environments
Most of SQL/DS operates in its own virtual machine. It services the data
needs of both noninteractive and interactive program development
environments.
• In multiple data base mode, several SQL/DS data bases operate at the
same time. Different data bases serve then needs of different
application areas or user groups. This mode allows for improved
accounting and SQL/DS availability. Activity on one data base does
not affect user access to the others.
For a more detailed overview, refer to the SQL/Data System Concepts and
Facilities for VMjSP manual. For complete details, refer to the SQL/Data
System Planning and Administration for VMfSP manual.
Noninteractive Environment
Catalogs
The SQL/DS catalogs are an active dictionary facility. SQL/DS maintains
definitions, control information, and genered information on data in a set of
catalogs. The catalogs are stored as data base tables. They contain
"inline" information that controls SQL/DS operation. Besides data
definitions, the catalogs contain user descriptions, authorizations, program
information, and statistics on the data. They also contain dependency
information (such as relationships of views to tables and programs to
indexes).
The following are some of the kinds of data kept in the catalogs.
• Data about users — who the SQL/DS users are, what privileges they
have, and what data base objects they own.
• Data about programs — the programs that have been defined to SQL/DS
and who owns them.
• Data about tables — column names and definitions and which columns
are indexed.
Each SQL/DS catalog is a table and can be accessed using SQL commands.
Also, because the catalogs are a shared resource, more than one user can
access them at the same time. The SQL/DS catalogs are created
Additional Features 29
If a certain DBSPACE is known to be in error, that DBSPACE can
be taken "off-line." The rest of the data base can then be placed in
service. Access to the "off-line" DBSPACE can be restored later.
Accounting
SQL/DS runs as a "service" virtual machine for multiple users. Therefore,
VM/SP treats SQL/DS as a single "user" in figuring the system accounting
records. All the VM/SP system resources that SQL/DS uses are grouped
together into one VM/SP accounting record. An SQL/DS facility must sort
out the amounts of system resources used by each SQL/DS user and
SQL/DS process.
An installation can also code a user "exit." This can be used to supply
additional accounting information (such as a project or account number)
for the user accounting records.
Data Recovery
The SQL/DS recovery facilities include the following:
• When a program ends abnormally, uncommitted data changes will be
backed out dynamically. That is, SQL/DS will undo all the changes
made to the data since the last time it was committed. Dynamic
backout does not interrupt service to other users or programs. Also,
applications or users may explicitly back out changes when they detect
logical errors.
• Data can be recovered from an archive tape and the log. The archive
process places a "backup" copy of the data onto a ^^pe. Archmng is
most commonly done when the SQL/DS operator shuts down SQL/D .
Archiving can be done while SQL/DS is serving its users; ser^ace to
those users is not interrupted. Archiving can involve the entire data
base, or just the log of data base activity. Archiving just the log is
faster, because the log is smaller than the data base.
SQL/DS can perform the complete archiving and restoring operations.
However, with the user archive/restore capability, other programs, such
as the VMBACKUP Management System or the VM/SP DASD Dump
Restore(DDR)facility, may be used for data base archives. Under most
circumstances, these programs can archive or restore a data base tas er
than SQL/DS because they take advantage of certain DASD
characteristics for high performance.
Additional Features 27
SQL/DS READER'S
General Information for VM/SP COMMENT
Order No. GH24-5064-1 FORM
This manual is part of a library that serves as a reference source for systems analysts,
programmers, and operators of IBM systems. You may use this form to communicate your
comments about this publication, its organization, or subject matter, with the understanding
that IBM may use or distribute whatever information you supply in any way it believes
appropriate without incurring any obligation to you.
Your comments will be sent to the author's department for whatever review and action, if
any, are deemed appropriate. Comments may be written in your own language; English is
not required.
Note: Copies ofIBM publications are not stocked at the location to which this form is
addressed. Please direct any requests for copies of publications, or for assistance in using your
IBM system, to your IBM representative or to the IBM branch office serving your locality.
B O
Yes No
at CO
Does the publication meet your needs? □ □
C •»-
Did you find the material:
Easy to read and understand? □ □
B CB
T3 E Organized for convenient use?
« E
□ □
CD 3
E »
Complete? □ □
e >-
Well illustrated? □ □
CO ^
Written for your technical level? □ □
If you would like a reply, please supply your name and address on the reverse side of this form.
Thank you for your cooperation. No postage stamp necessary if mailed in the U.S.A.
(Elsewhere, an IBM office or representative will be happy to forward your conunents or
you may mail directly to the address in the Edition Notice on the back of the title page.)
GH24-5064-1
NO POSTAGE
NECESSARY
IF MAILED
IN THE
UNITED STATES
Fold Fold
Your Name
Company Name Department
Street Address
City
State Zip Code
IBM Branch Office serving you
SQL/DS READER'S
General Information for VM/SP COMMENT
Order No. GH24-5064-1 FORM
This manual is part of a library that serves as a reference source for systems analysts,
programmers, and operators of IBM systems. You may use this form to communicate your
comments about this publication, its organization, or subject matter, with the understanding
that IBM may use or distribute whatever information you supply in any way it believes
appropriate without incurring any obligation to you.
Your comments will be sent to the author's department for whatever review and action, if
any, are deemed appropriate. Comments may be written in your own language; English is
not required.
Note: Copies ofIBM publications are not stocked at the location to which this form is
addressed. Please direct any requests for copies of publications, or for assistance in using your
IBM system, to your IBM representative or to the IBM branch office serving your locality.
Yes No
•5«
5
C3> M
Does the publicatioii meet your needs? □
.£ o
c ♦-
o o
M CX Did you find the material;
Easy to read and understand? □ □
E "S
"S ^
O E Organized for convenient use? □ □
ca a
e w Complete? □ □
i|
(o s
Well illustrated? □ □
Written for your technical level? □ □
M .2
E .€ What is your occupation?
S "»
cx a> How do you use this publication:
a> a
M M
3 CO As an introduction to the subject? □ As an instructor in class? □
S E
For advanced knowledge of the subject? □ As a student in class? □
To leam about operating procedures? □ As a reference manual? □
S*
03 CO
CO fX
Your comments:
If you would like a reply, please supply your name and address on the reverse side of this form.
Thank you for your cooperation. No postage stamp necessary if mailed in the U.S.A.
(Elsewhere, an IBM office or representative will be happy to forward your comments or
you may mail directly to the address in the Edition Notice on the back of the title page.)
GH24-5064-1
NO POSTAGE
NECESSARY
IF MAILED
IN THE
UNITED STATES
Fold
Fold
Your Name
Company Name Department
Street Address
City
State Zip Code
IBM Branch Office serving you
SQL/DS General Information for
i\