![]() | ||
| VisualPQL Procedures | ![]() ![]() ![]() ![]() | SAS Save File |
The SAS SAVE FILE procedure generates files in "exportable"
(text) format.
These files include procedure table data and schema information from the PQL program, including value labels, variable labels and missing value indicators.
SAS SAVE FILE EXPORT = filename1 , filename2
[ / VARIABLES = varlist | ALL]
[ / SORT = [ (n) ] variables [(A)|(D)], ...]
[ / BOOLEAN = (logical_expression ) ]
[ / SAMPLE = fraction [ ,seed ] ]
[ / NOLABELS ]
[ / LRECL = n]
EXPORT
|
Creates two text files. The first is the SAS control
statement file. It contains a
SAS DATA step including all appropriate SAS
commands such as MISSING, INFILE, INPUT and
LABEL and a PROC FORMAT step containing the
value labels. If the NOLABELS clause is specified, the
PROC FORMAT step is not generated.The second file is a fixed format data file, containing the data from the procedure table. This file is referenced in the DATA step of the first file. |
VARIABLES
|
Specifies the procedure variables that are written to the output
file. The order in which they are specified is the order in which they appear
in the output file. This corresponds to the order in which they are declared in
the SAS DATA step. If this option is not
specified, the default variables are output.
|
SORT
| Specifies the order in which the procedure table records and therefore the output are sorted.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. The optional seed is an integer that is used to initialise the random number generator. |
NOLABELS
| Specifies that variable and value labels are not written to the SAS file. This can save significant processing time if many labels are involved. |
LRECL
|
An LRECL parameter is present on the generated SAS
INFILE command.
Use the LRECL parameter to set this value. It must be greater than 50.
|
SAS file. The files
created by this run are text and can be edited.
The program creates a procedure
table record for each employee and contains the computed time spent in the
current position (TCURRENT) and the variables ID, GENDER,
MARSTAT and CURRPOS from the database.
RETRIEVAL INTEGER TCURRENT PROCESS CASES ALL . PROCESS REC 1 . GET VARS ID GENDER MARSTAT CURRPOS . PROCESS REC 2 VIA (CURRPOS) . COMPUTE TCURRENT = TODAY(0) - STARTDAT . END PROCESS REC . PERFORM PROCS . END PROCESS REC END PROCESS CASE SAS SAVE FILE EXPORT = SASPROC.TXT , SASDATA.DAT END RETRIEVAL
![]() ![]() ![]() ![]() |