Previous Topic: Specifying Data Set Name InformationNext Topic: More Information


Procedure for Defining Segments

Steps

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.

Example of a Non-SQL Segment Definition

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:

Example of an SQL Segment Definition

The following example defines a segment and its associated areas and files for an SQL-defined database. The characteristics of the segment are: