Search code examples
sas

what is the meaning of double question mark and ; in sas code


Could anyone explain following codes?

ASEX=put(sex, ?? Asex.);;

Why is there a ?? and why are there two semicolons (;) at the end?


Solution

  • The ? and ?? are modifiers on the informat that tell SAS not to signal an error when the value being read is not compatible with the informat being used.

    Format Modifiers for Error Reporting

    ?

    suppresses printing the invalid data note when SAS encounters invalid data values. See How Invalid Data Is Handled

    ??

    suppresses printing the messages and the input lines when SAS encounters invalid data values. The automatic variable _ERROR_ is not set to 1 for the invalid observation.

    The extra semicolon just creates an empty statement.