Steps to Follow if TR Directory is Full / The data (.tr) file directory/index

You can check to see if you are close to filling the directory up by just opening the tr file up in mentor and looking at the information it displays back.

Below is a screen shot from an example with the study <phone> used:

MENTOR 8.6.1.1918 v.23aug16 (8:13Nov16,86101918)(,) … 8.6.1.1918 (C) CfMC 1978 – 2012

14 Nov 2016 15:09

Spec file–>

List file–>

program default coresizes 2:15000000 used

System versions: lib=20131113,comp=86101918,msg=1918,progver=2003,odbc=no(dummy)

File versions: qff=86001,var=31,quota=9503,db=11,fone=74,stations=861

Enter ~(command) or >help –>~in phone;

adjustment: Worklen=800, Caselen=800

Input file: /cfmc/test8.6/data/phone.tr13 cases

Length=800, Worklen=800, Caselen=800, Casestart=1,trfile_directory size=25013(with 13 used).

Enter ~(command) or >help –>

The green highlighted region shows the directory size and the light blue shows the amount used.

If the amount used is approaching the total size, then you will want to build a new trfile with a much larger directory.


To do that you need to do the following:

When the study is DOWN go into mentor and type

~in <origname>

~out <nename> trfiledir=nnnnn writenow

~end

where <origname> is the current study name

<newname> is a temporary name for the new file

nnnnn is the new directory size. Set it to the total expected number of cases. Be sure to account for any partial cases that are also written to disk.

NOTE: The actual directory is built 2.5 times larger than your specification, so you don’t need to pad it.

Then when you are done, you will need to rename the TR files and use the new one as your active file.

Below is furtherinformation on the TR file directory and in particular how to increase the default size. We recommend you change the default if you have run into this error more than once.

The tr file index allows for very fast access to specific records in the file regardless of how big the file is. This is very important for any applications like View. Coding, or Existing Case Mode which require the study server to find a specific record in the tr file. Using such applications on an non-indexed file can cause severe processing issues for the study server.

The index can also speed up Mentor access to specific cases (N option in ~Cleaner) as long as you have not set sequential_read.

SURVENT USERS

Data (.tr) files created by Survent or the Study Server will be indexed by default.

For optimal performance of the index, you never want it to be more than 50% full, although the Server will continue to add cases until the file reaches 90%. However, It will not load a study if the tr file is >80% full. If you are more than very rarely running into this error, we recommend that you increase the size of your default index. See the parmfile option below.

The default directory size is 10,000. Note, that the actual number of records that are allowed in that file will be 2.5 times that. You can increase the size of the directory that is initially made for a tr file created by the study server in two ways:

Use the parmfile keyword:

Tryfiledirectory: <nnnnn>

This will cause every new tr file created to have that directory size. We recommend you never set it less than the over all default of 10K. The only drawback to setting it high is the file will be larger to acomodate the larger index. Each real entry uses about 20 bytes, so a directory of 100K (10 times defaul) is only 10 megabytes).

EX: Trfiledirectory: 50000

If you only want a specific study to have an increaed directory, you can use the questionnaire header option
trfiledirectory=<nnnnn>. This option then will cause the trfile for this study to be built with that directory size.

EX: Tr_file_directory=50000

Neither of the above options will effect any existing files.

MENTOR USERS

For Mentor users, you can put trfiledirectory on the ~output command to set the size of the directory you want to use.

If no trfiledirectory option is used, then the output file will have the same index size as the input file.

If the input file has no directory, then the output file will have no directory. You can override this setting by using the Meta command trfiledirectory=<nnnnn> and then tr files created by Mentor will have this directory size. You can put that command in your mentinit file to have it always be the default.

You can use the option -trfiledirectory to create a file without a directory even though the input file has one.

You can check the size of the directory and how full it is by just opening the tr file up in mentor and looking at the information it displays back.

Below is a screen shot from an example with the study <phone> used:

MENTOR 8.6.1.1918 v.23aug16 (8:13Nov16,86101918)(,) … 8.6.1.1918 (C) CfMC 1978 – 2012

14 Nov 2016 15:09

Spec file–>

List file–>

program default coresizes 2:15000000 used

System versions: lib=20131113,comp=86101918,msg=1918,progver=2003,odbc=no(dummy)

File versions: qff=86001,var=31,quota=9503,db=11,fone=74,stations=861

Enter ~(command) or >help –>~in phone;

adjustment: Worklen=800, Caselen=800

Input file: /cfmc/test8.6/data/phone.tr138 cases

Length=800, Worklen=800, Caselen=800, Casestart=1,trfile_directory size=25013(with 138 used).

Enter ~(command) or >help –>

The green highlighted region shows the directory size and the light blue shows the amount used.