|
Action |
Statement |
|---|---|
|
Define a segment |
CREATE SEGMENT |
|
Define one or more files to be associated with the segment |
CREATE FILE |
|
Define one or more areas to be associated with the segment |
CREATE AREA |
|
If the segment is an SQL segment, add its definition and minimally the definition of its associated areas to the application dictionary that will contain the definitions of the SQL-defined database |
CREATE SEGMENT, CREATE AREA |
|
Add the segment to an existing DMCL definition |
ALTER DMCL with the ADD SEGMENT clause |
|
Make the DMCL available to your runtime environment |
See Chapter 5, “Defining, Generating, and Punching a DMCL" |
Note: When copying an SQL segment definition to the application dictionary, you do not need to define the files.
The following example creates a segment for a non-SQL defined database. The statements in the example define the segment and its associated files and areas. The characteristics of the segment are:
create segment empseg;
create file empseg.empdemo1
assign to empfile1
dsname 'corp.syspub.empfile1'
disp shr;
add area empseg.emparea
primary space 2000 pages
from page 990001
page size 6000 characters
subarea calc-range offset 1 for 100 percent
symbolic index emp-lname-ndx
based on sorted key length 10 for 10000 records
within file empdemo1;
The following example defines a segment and its associated areas and files for an SQL-defined database. The characteristics of the segment are:
You must define the segment in both the application dictionary that will contain the schema and table definitions and in the system dictionary.
For example, area EMP_AREA contains 1500 pages beginning on page 80001 and ending on page 81500. The first 1000 pages are the initial allocation. The remaining 500 pages are reserved for future expansion of the area. Additionally, the synchronization stamp for area EMP_AREA is by table, overriding the specification made at the segment level.
create segment prodseg
for sql
for schema prodschm
stamp by area;
create file emp_demo1
assign to empfile
vsam;
create file proj_demo1
assign to projfile
vsam;
create area emp_area
primary space 1000 pages
from page 80001
maximum space 1500 pages
page size 6000 characters
stamp by table
within file emp_demo1;
create area proj_area
primary space 1000 pages
from page 82001
maximum space 1500 pages
page size 6000 characters
within file proj_demo1;
|
Copyright © 2014 CA.
All rights reserved.
|
|