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

P-STAT: File Management Capabilities

Three powerful commands: SORT, LOOKUP, and CONCAT
SORT

The P-STAT sort command can sort any mixture of numeric and character data in ascending or descending order. Up to 15 fields may be used to control the sort.

Ties are maintained in the order in which they are found. Thus a file can be resorted if more than 15 key fields are needed. If the file is already in sort order on one or more major key variables, the file can be sorted on a secondary variables within the original sort structure.

LOOKUP

The LOOKUP command is used to add data in one or more tables files to an input file. The files do not need to be in sort order. Matching is done by comparing the values of common variables.

When there are many tables files the linking may be indirect. This means that all the files do not need to have the same key variables. Given three files with these variables
 Input File              First Table File              Second Table File
    
 Social                  Social      Account           Account
 Security   Q1   Q2      Security    Number   Q3       Number    Q4
Variable Social.Security provides a direct link between the input file and the first table file. Variable Account.Number provides a direct link between the first table file and the second table file. Thus there is an indirect link between the input file and the second table file. The resulting output file would have the following variables.
 Social                 Account
 Security    Q1    Q2   Number    Q3    Q4
CONCAT

The CONCAT command is used to join one or more files by adding the cases. Various optional identifiers specify the variables that are to be included in the output file.

A template can be provided to specify which variables are to be included and their order in the output file. When no options are specified, all variables in all of the input files are placed in the output file.

Other File Management Commands