Conditional Processing (DEFINE-!ENDDEFINE command)

The !IF construct specifies conditions for processing. The syntax is as follows:

!IF (expression) !THEN statements
                [!ELSE statements]
!IFEND

Example

DEFINE mymacro(type = !DEFAULT(1) !TOKENS(1))
!IF (!type = 1)!then 
frequencies variables=varone.
!ELSE 
descriptives variables=vartwo.
!IFEND
!ENDDEFINE.