MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)

The MATRIX command, when encountered in a session, invokes the matrix processor, which reads matrix statements until the END MATRIX or FINISH command is encountered.

  • MATRIX is a procedure and cannot be entered inside a transformation structure such as DO IF or LOOP.
  • The MATRIX procedure does not require an active dataset.
  • Comments are removed before subsequent lines are passed to the matrix processor.
  • Macros are expanded before subsequent lines are passed to the matrix processor.

The END MATRIX command terminates matrix processing and returns control to the command processor.

  • The contents of matrix variables are lost after an END MATRIX command.
  • The active dataset, if present, becomes available again after an END MATRIX command.