12.07.2015 Views

CODE DESIGN, MACROS, AND SUBROUTINES

CODE DESIGN, MACROS, AND SUBROUTINES

CODE DESIGN, MACROS, AND SUBROUTINES

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>MACROS</strong>Enables you to delay resolution of a portion of your code.You can replace a hard-coded filename, variable, or section with dynamiccode that is generated at the time of executionSAS and Stata process macros similarly, but SAS passes your entireprogram through the macro pre-processor, while Stata operates line by line.Result: If there is an error, SAS will fail prior to processing data whileStata will run until the first macro failureStata uses macros in built in commands (ado files). Using global macroscan have unintended effects. You can unknowingly overwrite anexisting variable or use a macro variable created in another commandWednesday, August 21, 13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!