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

BMDP Save File

BMDP ® is a statistical package produced by Statistical Solutions Ltd, Cork, Ireland.

The BMDP SAVE FILE procedure produces a BMDP system file that contains data and data dictionary (schema) information in a format that is directly useable by the BMDP programs. The file contains procedure table data, value labels, variable labels and missing value indicators.

Values are assigned to all missing values when the file is prepared for BMDP and original missing values are no longer accessible when the file is read by the BMDP programs.

The procedure produces a summary report listing the variables in the file, the name of the output file, the file code and other information.

BMDP SAVE FILE     FILENAME = filename
   [ VARIABLES = varlist | 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 that variables are specified is the order that 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 is 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 is used.

Example

The following produces a BMDP system file with the variables ID, GENDER, SALARY, EDUC and the computed variable AGE:

RETRIEVAL
INTEGER * 1 AGE
PROCESS CASES
.  PROCESS REC EMPLOYEE
.  GET VARS ID GENDER SALARY EDUC
.  COMPUTE AGE = (TODAY(0) -BIRTHDAY) / 365
.  PERFORM PROCS
.  END REC
END CASE
BMDP SAVE FILE FILENAME = BMDP.SYS
END RETRIEVAL
The following report is displayed upon completion of the program.

BMDP SAVE FILE SYNOPSIS
-----------------------

WRITTEN TO:                 "BMDP.SYS"
CODE IS:                    SYSUSR2
NUMBER OF CASES:            20
NUMBER OF VARIABLES:        5

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

AGE   ID     GENDER    SALARY    EDUC

homecontents start chapter top of pagebottom of pagenext page index