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

SYSTAT Save File

The SYSTAT SAVE FILE procedure creates a binary file in SYSTAT® internal format that contains data and schema information produced in a VisualPQL program. SYSTAT is a statistical package that runs on PCs.

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

VARIABLES Specifies the procedure variables that are written to the output file. The order in which variables are specified is the order in which they 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 Systat binary 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
SYSTAT SAVE FILE FILENAME = SYSTAT.DAT /
                 SORT     = SALARY (D)
END RETRIEVAL
After the retrieval finishes, the following summary report is displayed.

SYSTAT SAVE FILE SUMMARY REPORT
-------------------------------

SYSTAT FILENAME .......SYSTAT.DAT

NO OF DATA RECORDS ..... 20
NO OF COLUMNS .......... 4

COLUMN NAME (TYPE)

ID (REAL)           GENDER (REAL)       CURRPOS(REAL)
SALARY (REAL)

SYSTAT SAVE FILE COMPLETE

homecontents start chapter top of pagebottom of pagenext page index