MATRIX and Other Commands (MATRIX-END MATRIX command)
A matrix program is a single procedure within a session.
- No active dataset is needed to run a matrix program.
If one exists, it is ignored during matrix processing unless you specifically
reference it (with an asterisk) on the
GET,SAVE,MGET, orMSAVEstatements. - The
GET,SAVE,MGET, orMSAVEstatements support both dataset references and physical file specifications. Take the following example:DATASET CLOSE ALL. NEW FILE. GET FILE 'Samples\English\Employee data.sav'. DATASET DECLARE corr. CORRELATIONS bdate to minority /MATRIX=out(corr). MATRIX. MGET /file=corr/type=corr. PRINT CR. END MATRIX.The example uses
corras a reference to a virtual dataset. The correlation output can also be saved to a physical file. - Variables defined in the active dataset are unavailable
during matrix processing, except with the
GETorMGETstatements. - Matrix variables are unavailable after the
END MATRIXcommand unless you useSAVEorMSAVEto write them to the active dataset. - You cannot run a matrix program from a syntax window
if split-file processing is in effect. If you save the matrix program
into a syntax file, however, you can use the
INCLUDEcommand to run the program even if split-file processing is in effect.