Home Page Overview
New Features Downloads & Prices
P-STAT documentation Technical Support
Contact P-STAT Unistat for Windows

Version 3.01
Jan 07, 2014

Longer Names

The most important change in Version 3 is the length and makeup of the names of the variables in a file.

Version 3 names are increased from 16 to 64 characters. Underscores are now allowed. Also, a name can start with a "tag", serving as a nickname. The tag ends with 2 semicolons, as in:

          q31::price_of_eggs .

Many commands use a shortened version of the 64-character names for labelling output. These have 16 characters or less. These are derived from the full names.

Matching Names

One result of having variables with 64-character names is the need to be able to refer to them without always having to enter their full names.

This is done in version 3 with wildcard matching, comparing full names, comparing tags, and looking for abbreviations. They are attempted in that order. When running P-STAT you can use HELP MATCHING.NAMES $ for details.


This capability is now more general; they can be used, for example, for the operands in PPL statements. When running P-STAT you can use HELP WILDCARDS $ for details.

Reading files in version 3 that were made in version 2

Because the names of variables are larger, the format of P-STAT's system files has changed. A Version 3 module can read a version 2 system file, but a version 2 module cannot read a version 3 system file.

The basic structure of unformatted files has changed on PCs. This does not affect P-STAT system files, but could affect an old edit file, made in version 2, and needed in version 3. Use HELP FILETYPE $ or HELP MIGRATE $ for details.

Libraries have been dropped

Libraries of system files have been dropped in version 3. The availability of huge disks and the use of folders and directories have made libraries unnecessary. As a result, commands like SAVE and FIND have been dropped.

Two new commands, LIBRARY.CONTENTS and LIBRARY.EXTRACT, have been added. They extract designated files from a library, allowing them to be used in version 3. Use HELP LIBRARIES $ for details.

The SHOW and Check commands

SHOW: the command default is to show full 64-character names. Using FULL.SQUEEZE, TEXT, SHORT, SHORT.16 or SHORT.OLD would change what is shown. These forms are accepted by many commands, using HELP NAMES$ provides details about them.

Two additional options are available only for the SHOW command. TAGS.ONLY will show just the tag if a name has a tag. TEXT.ONLY will show just the text section. All other names are shown with 3 dashes, nothing more. Using SORT with either of these causes the names with tags and text to be shown first. Use HELP SHOW $ for details.

CHECK: this command takes a quick look at a P-STAT system file. In addition to its number of cases and number of variables, the report now has the date and time when the file was made, and the version of P-STAT that made it. Use HELP CHECK $ for details.

Improved use of BY in the COUNTS command

COUNTS: a new format is now available for the COUNTS output when BY is used and is, in fact, now the default. This treats the BY variable as the major (ie, first) variable in the nesting of the BY variable, the other variables, and the values of the other variables.

This means that there are now 3 different ways of presenting a BY result. Since the BY variable appears in position one or two or three in the 3 formats, they are requested by using one of the phrases FORMAT 1, FORMAT 2 and FORMAT 3, FORMAT 1 being the default.

Use HELP COUNTS $ for details of this and other changes. Use HELP COUNTS.2 $ to see how the 3 formats appear.

Managing names in the LIST command

LIST: the default mode for showing names of variables is now FULL.SQUEEZE, which replaces any group of dots and underscores with a single blank. This is easier to read, and may be shorter.

However, FULL or SHORT can be requested instead. Use HELP LIST $ for details.

A new PPL function for revising date formats

FORMAT.DATE: this a major addition to the date/time functions. It takes two arguments: a character value to be formatted, and the format to be used, and produces the value in the new format. For example,

FORMAT.DATE ( 'Wed March 15, 1995 10:13:15',
               'yyyy-mm-dd time a.m. dow' )


               '1995-03-15 10:13:15 a.m. wed' .

The format operator 'dow' requests day of week. Using dd/mm/yyyy would have produced 15/03/1995. Use HELP FORMAT.DATE $ for details.

TURF changes

TURF: short names, as described in help names$, are now used to identify the items making up a combination being shown, for example, in the reach.results file.

When FORCE is used, a new option, FORCE.FIRST, causes all the forced items to be shown first, and in the order that they were given to the TURF command.

FILTER is now the name used for what has been called CONSTRAIN (although CONSTRAIN still works). The maximum number of filters has been increased from 30 to 100. Filters can now be used in FORCE runs, and in STEP runs. The final report now contains the number of combinations ignored because of filters.



TABFILE.IN: when the input file begins with irrelevant records, using SKIP 5 (or whatever) will bypass that many beginning records. If the final case is unfinished, it is now nonetheless accepted, with missing values supplied where needed.

The LABEL.CHANGES identifier, followed by a filename, can be used to write a system file which has, for each variable, the original name and what it was changed to.

The EXTENDED.LABELS identifier, followed by the name of an external file, writes a file in P-STAT labels format, with the original name appearing to be an extended label. This could be used, for example, by LIST. Use HELP TABFILE.IN $

Other changes

PATCH: this is a new command, not unlike REFORMAT, that adds or removes bytes at specified locations in an external file, and created a new external file. Use HELP PATCH $ .

MAKE: the default delimiter separating values was a comma when reading external files. It was either comma or blank when reading interactively.

The external default is now either comma or blank. However, using DELIMITER COMMA reduces delimiting to just a comma, as was the case in version 2.

SURVEY: displaying names of variables

SURVEY has a new subcommand which specifies how the stub and banner variable names should be displayed in version 3.

The assumption is that FULL 64 character variable names will be used in the printed output unless:

     1. one of the general identifers TEXT or SHORT is used in the command or

     2. there is a labels file which contains extended variable names or

     3. the SURVEY subcommand SET.LABELS specifies how specific parts of the printout are to be labeled.

The SET.LABELS subcommand may have a single argument which will apply to all label usage until the next SET.LABELS subcommand is processed.

     SET.LABELS FULL;    (or FILE, SHORT, TEXT)     

or SET.LABELS may have 2 arguments which will apply to the specific area designated by the first argument (XXXXXXX).

     SET.LABELS      XXXXXXX      FULL;      (or FILE, SHORT, TEXT)

     XXXXXXX    is any one of these      BANNERS      MR.BAN      STUBS      GR.STUBS      MR.STUBS
          QUESTION      WEIGHT      BY      MEANS      SUMS      MEDIANS

You may provide as many SET.LABELS subcommands as you need. It would be quite usual to provide a sequence such as:


With this setting the banner variables will be SHORT and all other labels in the table will be the full labels as found in the P-STAT system file.


The other major enhancement is in the SPREADSHEET output format. The variable labels are not broken up across multiple lines but are placed in a single cell.

If there is only one banner variable the column label is placed in the rightmost cell assigned to that banner variable. If there are multiple banner values, the label is placed in the middle cell for that banner variable.

In version 2, the number of lines per page was estimated early in the data processing step. In version 3 the estimation is more accurate because it is done later when more is known about the space that is required.