There are 6 steps to extend the length of a DMS Datafile. It is important that you follow these steps. The "ALLOCATE" option of the DMS:DESCRIBE program will create a .DTA file with no records in it. If you don't follow these steps and work with a temporary work file, you could end up deleting all records from the "live" datafile.
1. View the
current specifications of the file:
$ MCR
DMS:DESCRIBE STUDENT
DESCRIBE Option? SHOW
Number of fields described: 19
Number
of key fields : 2
Number
of virtual fields : 0
Number
of field names : 19
Structure level : 2
Highest position described: 256
Highest
position available: 511
2. Copy the
.DSC file to a new, temporary name:
$ COPY
STUDENT.DSC NEW_STUDENT.DSC
3.
Re-Allocate the new datafile to the appropriate size:
$ MCR
DMS:DESCRIBE NEW_STUDENT
Type
"HELP" for assistance
DESCRIBE Option? ALLOCATE
Number
of characters in each record (256-2047) <511>? 1000
Record
length adjusted up to 1023 to optimize space
Maximum
number of records? 100
File: MOE$DKC400:[GREG.TEST]NEW_STUDENT
100
records, 1023 characters per record.
The
file will be approximately 202 blocks long.
Actual
record maximum: 100
Proceed
<NO>? YES
4 Transfer
records from the original file to the temporary file:
$ MCR
DMS:TRANSFER
TRANSFER V6.8-02 - Information Transfer Program
Copyright (c) 2000, Campus America, Inc.
Left-side Data File Name? STUDENT/ALL
Right-side Data File Name? NEW_STUDENT/EXTEND
Key
Field Load <NO>?
Number
of Level Breaks <0>?
Command 1? .* TO .*
Command 2?
Proceed
with the Transfer <NO>? YES
5. Rename
the temporary datafile to the "live" filename:
$
RENAME NEW_STUDENT.* STUDENT.*
6. View the
new specifications of the file:
$ MCR
DMS:DESCRIBE STUDENT
DESCRIBE Option? SHOW
Number of fields described: 19
Number
of key fields : 2
Number
of virtual fields : 0
Number
of field names : 19
Structure level : 2
Highest position described: 256
Highest
position available: 1023