Directives File Syntax

A directives file is a text file that contains specifications for data area attributes. The following shows all possible attributes that can be updated using a directives file. The first letter of each line below (D, S, F, I) is a directive and following each directive are the attributes (DataArea, FileName, etc.) controlled by that directive.

D DataArea DBSpace
S SystemCode DBSpace
F FileName RecsInit RecsInc DBSpace LogChanges UseVarchars 
I DataID

At a minimum, a directives file must contain a D directive to specify which data area is to be updated. There is no maximum number of directives that can be included.

Example: Database Space Assignment

D new_data_area my_space_1

This example shows a simple directives file that creates a new data area (new_data_area) and assigns it to a database space (my_space_1).

Example: Initial and Incremental Record Counts

D data_area_1
F timerecord 10000 2000
D data_area_2
F employ_table 10000 2000

This example shows a directives file that updates two data areas. In data_area_1, the initial record and record count increments are updated for the table "timerecord." In data_area_2, the initial record and record count increments are updated for employ_table. The initial counts are set to 10,000 and the number of records to increment by is set to 2000 for both tables.

Attribute Considerations

An attribute can be specified by its position in the directive (Using Attribute Positions) or by using the attribute name (Using Attribute Names).

Both types of specifications can be contained in the same directive, but any positional specifications must appear before named attributes.

The types of values that can be entered for each attribute are described in Attribute Values.

  • A hyphen (-) indicates that a particular attribute remains unchanged.

  • An asterisk (*) indicates that the attribute should be set to the default.

Using Attribute Positions

When you specify the attribute by its position in the directive line, consider the following:

  • Every attribute in the directive must be in the correct position for editda to interpret what needs to be changed.

  • Use one white space or a comma to separate attributes.

F timerecord 10000 - myspace - *

In the above example, the following actions are specified:

  • Set RecsInit to 10,000

  • Set Database Space to myspace

  • Do not update LogChanges (indicated by the hyphen character)

  • Reset UseVarchars to the default (indicated by the asterisk character)

Using Attribute Names

The attribute name method offers greater flexibility in specifying attributes. An attribute name specification uses the syntax of attribute_name=value. For example, using the short form for RecsInit, you could specify an initial record count with an entry like init=10000.

When specifying attributes using their name, you can

  • Use shortened attribute names

  • Omit attributes that do not change

  • Specify attributes in any order within the directive

F timerecord VC=*,init=10000,space=myspace

The above command shows an equivalence specification that has the following results:

  • UseVarchars (VC) is reset to the default.

  • RecsInit (init) is set to 10,000.

  • Database Space (space) is set to myspace.

See Attribute Name Variations.

Attribute Values

Following is a list of all attributes that can be updated through the editda utility and what possible values can be assigned to the attributes.

Note: You need to define SystemCode, FileName, and DBSpace in dbdef before changing those attributes with editda.
Attribute Value
DataArea Any name.
DataID Any name.
SystemCode Any existing system code.
FileName Any existing file (table).
DBSpace Any existing database space.
RecsInit (Initial Record Count) An integer.
RecsInc (Record Count Increment) An integer.
LogChanges

For Environment release 8.0.1 and above, most customers do not need to change this attribute.

Values are:

  • N=No logging (default)

  • Y=Log for Resource Management

  • U=Log for upgrade

  • A=Log for Resource Management and upgrade

UseVarchars

Enable varchars for all non-indexed columns:

  • K=Enable varchars for all columns (indexed and non-indexed)

  • N=Disable varchars for all columns

Attribute Name Variations

Equivalence specifications (attribute_name=value syntax) can make use of shortened names. The following table shows the acceptable alternatives.

Attribute Accepted names and variations
DataAreaName DATAAREANAME NAME
DataID
SystemCode SYSTEMCODE CODE NAME SC
FileName NAME FILENAME FN
DBSpace DBSPACE SPACE S
RecsInit (Initial record count) RECSINIT INIT
RecsInc (Record count increment) RECSINC INC
LogChanges LOGCHANGES LC
UseVarchars USEVARCHARS VARCHARS VC

Example: Comparison of Attribute Specifications

Each of the directives in this example accomplishes the same updates on the timerecord file:

  • Set the initial record count to 10000

  • Make the database space myspace

  • Return the varchars option to the default setting

Attributes are specific by the position in the line; white spaces separate the attributes:

F timerecord 10000 - myspace - *

Attributes are specific by the position in the line; commas separate attributes:

F timerecord,10000,,myspace,,*

Attributes are specified with a mix of positions and names; position specifications come before attribute names, and white space separates attributes:

F timerecord 10000 space=myspace VC=*

Attributes are specified with attribute names; unchanged attributes omitted:

F timerecord s=myspace,VC=*,init=10000