ITEM FILE UTILITIES

This section describes several utility programs that can be used
to assist in the task of constructing item files.

INUM

This program simply produces a list of numbers that can be read
into your file as item numbers. NUM asks you for the initial number
and the end number, and also for the correct response indicator.
These numbers are then written to an output file nominated by
the user.

So, for example, if you gave 1 and 5 as input, with the correct
response indicator -, the program will output the following:

-001

-002

-003

-004

-005

You could then give a further number pair as input, repeating
this procedure until you have all the numbers you need.

To terminate execution, give the pair 0 0 as input.

ISELECT

This program selects words at random from an input list. The input
list can consist of any text at all, provided that each item is
terminated by a semi-colon, e.g.:

grow;

force;

towel;

destroy;

The user specifies the input file and an output file where the
selected items will be written.

Next, the program asks how many words you want, and asks for a
positive number as the seed for the random number generator. If
you give the same number on two successive runs, the same list
will be generated. Sampling is done without replacement.

Lists of words in suitable format for this program are provided
in the NEIGHS directory. These are grouped by length, and have
been taken from the UNIX dictionary. These files have names such
as WORD4.LST -- this would be the list of 4-letter words. These
lists have been edited to exclude obviously silly words, such
as "quahog". We will eventually build up lists of nonwords
as well.

ILEAVE

This program takes an item file blocked by conditions (i.e., all
items in a condition are grouped together), and produces an interleaved
version, with the first members of all conditions listed first,
followed by the second members, etc.

The program requests specification of the input file and an output
file where the interleaved version will be written.

Next, the program asks for the number of items in each condition.
The program assumes that each condition has the same number of
items.

Finally, the program asks for the Grouping factor. This functions
the same way as in the scrambling routines. If this is specified
as 2, then the program treats the first two items as if they were
a single item, and so forth. This has the effect of grouping adjacent
items together, and preserving this grouping in the interleaving
process. Note that this has implications for the specification
of the number of items per condition -- the program asks for information
about the number of "grouped" items. For example, assume
a grouping factor of 2, and 3 (grouped) items per condition. The
input file might look like this:

001 a;

002 b;

003 c;

004 d;

005 e;

006 f; ----- end of Condition 1

011 A;

012 B;

013 C;

014 D;

015 E;

016 F; ------ end of Condition 2

Note that although there are really 6 items per condition, we
only specify 3 because we have specified a grouping factor of
2 (i.e., 3 x 2 = 6). With this input, the output file would look
like this:

001 a;

002 b;

011 A;

012 B;

003 c;

004 d;

013 C;

014 D;

005 e;

006 f;

015 E;

016 F;

A further feature of this program is that the input file may include
instructions, etc., that are enclosed in dollar symbols. As in
the scramble routines, any material between $s will be left in
its original position in the file. So, for example, if the above
input file had looked like this:

Note also that you should not have the normal DM parameters as
the first line of your file. These will be treated as if they
are part of the first item.

BSCRAM

This program duplicates the function of the DMASTR scrambling
routines, but can be run as a separate program. All the conventions
are the same, except once again that the first line should not
contain the DM parameters. The scramble parameters are supplied
at run-time by the user, as in the ILEAVE program. The two parameters
required are the block-size and the item grouping factor.

BSCRAM assumes a default input extension of ".itm",
and supplies a default output extension of ".scr".

TOUPPER/TOLOWER

Lists of items (or, indeed, any other ASCII files) may be changed
from upper to lower case or vice versa using these two programs.

To convert upper to lower case type:

Tolower < filename > new filename <cr>

where < indicates the input file

and > redirects the changed file into a new output file.

Items may also be "piped" through other programs such
as SORT while undergoing case change.

For example:

Toupper < filename | sort > new filename <cr>

will convert items to upper case as well as list them alphabetically.

N.B. If the new filename is the same as the input filename, the
input file will be deleted once the case change has been completed.

It is also possible to change case using the CL program. Simply
mark a block, and then type ^K+ to convert everything within that
block to upper case, or ^K- to convert to lower case.

CASE_MIX

This program works in the same way as TOUPPER and TOLOWER except
that its output consists of alternating upper and lower case letters.
The input file may be in upper case, lower case or mixed.

FRAME

FRAME is used to edit item files, and allows a constant text string
to be inserted in specified frames of all items in the file.

Each item in the input file must have the following:

(a) a blank before the first frame;

(b) a frame-delimiter (/) between adjacent frames;

(c) an end-of-item delimiter (;) at the end of each item.

Thus, for example, a file might consist of the following:

+001 doctor/nurse;

+002 black/white;

-003 drag/fenstle;

-004 water/sprant;

Input to FRAME is as follows:

(1) Input file name (default extension = ".itm")

(2) Output file name (default extension = ".itm")

The first three items of the file, and the last three items are
then printed.

(3) Command type:

I insert

R remove

W write

Command "I" means insert a text string in each item;
"R" means remove a specified number of characters from
each item; "W" means write the file to disk and exit.

(4) Text specification:

In the insert mode, key in the text to be inserted; in the remove
mode, specify how many characters are to be removed.

(5) Frame-number:

Specify which frame should be modified, e.g., 3 = the third frame.

An additional option is to specify the number of the frame in
right-to-left order. In this case, the number should be followed
by an asterisk. E.g., 3* = the third last frame.

If "0" is entered, then ALL frames are modified in the
same way.

(6) Frame-position:

Specify whether modification is to be made to the beginning ("B")
or the end ("E") of the frame. FRAME does not allow
modifications to be made internally. These changes should be made
with a conventional editor.

FRAME will then carry out the modification, print out the first
and last items, and prompt for the next command.

All the above conventions are explained in the prompts.

ICHECK

'ICHECK' will check an item file for syntax errors, and will attempt
to interpret the error.

Usage:

ICHECK filename [-g] [-p]

ICHECK assumes that the file is a graphics file intended for DMTG.
If your file is not a graphics file, then specify the switch "-g"
after the filename (this will actually make very little difference,
since the major difference in the syntax between the file types
is the possible presence of the display switch "g" in
an item displaying a bit-mapped graphics image rather than text).

The '-p' switch suppresses paging of the error-listing. This is
relevant if you are redirecting output to a file.