HomeStartingEnvironmentDBMSVisualPQLProceduresSQLFormsHost/APIIndex
PQL Procedures homecontents start chapter top of pagebottom of pagenext page index MINITAB Save File

MINITAB Save File

The MINITAB SAVE FILE procedure creates a text file in MINITAB® external format that contains data and schema information produced in a VisualPQL program. MINITAB is a statistical package that runs on a number of different types of computers.

MINITAB SAVE FILE    EXPORT = filename
    [ VARIABLES = var_list | ALL  ]
    [ SORT      = [(n)] variable [(A)|(D)], ...]
    [ BOOLEAN   = ( logical_expression )  ]
    [ SAMPLE    = fraction]
EXPORT Specifies the filename created by the procedure.

VARIABLES Specifies the procedure variables written to the output file. Specify the variables in the order they are to appear in the output file. If this option is not specified, the default variables are output.

SORT Specifies the sequence of the output. n is an integer that specifies the maximum number of records to be sorted. The default for this parameter is either the number of records in the database or the value specified in the sortn parameter and need only be specified if the number of records in the procedure table is greater than the default. The procedure table is sorted by the specified variables in variable list order. A variable name followed by (A) or (D) specifies that for that variable the sort is in Ascending order (the default) or in Descending order.

BOOLEAN Specifies which procedure table records are used by the procedure. The procedure table records for which the logical expression is true are used by the procedure. If this option is not specified, all procedure table records are used.

SAMPLE Specifies that a random sample of the procedure table records are used by the procedure.
The fraction specifies the percent of records used and is specified as a positive decimal number less than or equal to 1 (one). .25, for example specifies that a 25% sample be used.

Example

The following example creates a MINITAB file with one record per employee and the variables ID, GENDER, CURRPOS and SALARY. The records are sorted by Salary in descending order.

RETRIEVAL
. PROCESS CASES
.   PROCESS REC EMPLOYEE
.     GET VARS ID GENDER CURRPOS SALARY
.     PERFORM PROCS
.   END REC
. END CASE
MINITAB SAVE FILE EXPORT = MINITAB.DAT /
                  SORT   = SALARY (D)
END RETRIEVAL
After the retrieval finishes, the following summary report is displayed.

MINITAB PORTABLE WORKSHEET SYNOPSIS
-----------------------------------

WRITTEN TO                'MINITAB.DAT'

NO OF ROWS                20
USER VARIABLES             5

VARIABLES IN SAVE FILE ORDER
----------------------------

ID
GENDER
CURRPOS
SALARY

homecontents start chapter top of pagebottom of pagenext page index