MODVAR creates variables based on the task values for each module for each case. The user may either create new computed variables or replace the task data with this new module data. There are six different computations allowed. If the task values are replaced, the module values will be converted to percent time spent.

Program Invocation
The specific syntax for program invocation varies between operating systems. This document diplays the code for the AIX version.
opt: R Replace task values with converted module values ssss: The study number CDf1: Input Case Data file TFf: Input Task Factor file (optional) MT: Input Module Title file CDf2: Output Case Data file
MODVAR Control Card
MODVAR: cc 01-06 The literal 'MODVAR' study: cc 08-11 The study number title: cc 13-72 The title for the output Case Data file
Request Cards
The cards presented in this section control the performance of operations on the set of tasks. Tasks may be sorted within module, selected or deleted based on some particular value, or summarized into a value for each module, depending on the specific instruction given. The SELECT and SORT cards can be used in combination to cause the current task set to be reduced. The result of using a SELECT card is cumulative. Once a task has been removed from the current task set it cannot be restored. The COMPUTE card can only be used once. This card begins the computation of the module variables. Once this card is read, no other request cards can be entered.
SORT Card
When this card is used, the current task list is sorted into sequence based on the values of the specified task factor. This is useful when selecting tasks using the SUM function on the SELECT card as described below. Sorts do not have a cumulative effect, that is, if one sort card immediately follows another, the first sort will be performed, but its sequence will be lost when the second sort is encountered.
SORT: cc 01-04 The literal 'SORT' factor: cc 06-11 The factor identifier for the task factor to be used for sorting (e.g. GP0001) type: cc 13-15 The type of factor to be used. (e.g. PMP) seq: cc 17 The sort sequence desired A - Ascending D - Descending (default)
SELECT Card
Use of this card causes any tasks which have values that meet the specified condition to remain part of the task set. Values which do not meet the condition cause the corresponding task to be removed from the current task set. To restore the current task set to the full job inventory the RESET card must be used.
SELECT: cc 01-06 The literal 'SELECT' factor: cc 08-13 The factor identifier for the task factor to be used in comparisons (e.g. GP0001) type: cc 15-17 The type of factor to be used. (e.g. PMP for percent members) function: cc 19-21 The function to use to determine the value for each task which will be used in the comparison. VAL - use the task value directly NUM - use the sequence number of the task SUM - use the cumulative sum of the tasks cond: cc 23-24 The logical condition to use for the comparison value: cc 26-37 The value to be compared against
COMPUTE Card
This card causes new module variables to be added to the output Case Data file. The new variables are computed using the current task list and the function specified on the card. The requested function is performed utilizing the task values and the module pointer list contained in the input Module Title file.
COMPUTE: cc 01-07 The literal 'COMPUTE' function: cc 09-11 The function to be used to determine the resulting value for each module: NUM - use number of tasks within the module SUM - use the sum of the task values within each module AVG - use mean value of the tasks within each module RMS - use the standard deviation of the task values within each module (root mean squared) MIN - use the minimum task value for each module MAX - use the maximum task value for each module PCT - use the percent of tasks within each module that are performed
@codap modvar - ssss cd100 - mt000 cd101 MODVAR ssss Case data - computed variables added based on modules COMPUTE SUM
The output Case Data file will have NMOD additional computed variables. Each one will be the sum of tasks performed by that case within that module.
@codap modvar r ssss cd100 - mt000 cd102 MODVAR ssss Case data - task variables replaced by modules COMPUTE SUM
The task data for each case will be replaced by the computed module data. Once the sum of tasks for each module is computed, it is converted to a percent time spent value. Then, for each case, only those modules which were non-zero will be written out as case data. Additionally, the task titles will be replaced by the module titles on file mt000, with one duty that includes all modules (tasks).