As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.
Here are some tips for How to share your SAS knowledge with your professional network.
Writing Testing Aware Programs
Short url for this page: http://tinyurl.com/64xswz
Program development proceeds through four phases: investigation, development, unit testing, and integration testing. Testing typically consumes 50% of project resources. Any programming effort spent in support of testing may significantly reduce project costs and help ensure the delivery of the project's product: a set of tested and integrated programs.
This paper examines the architectural issues of writing SAS(R) programs that are testing-aware: that have a variable Testing whose default value is false, which can be reset to true based on the values of options and which write information to the log when testing is true.
- Topics covered include
options used for testing, both command-line and used-anywhere; example code for data step, includes and macro programs used as any of module, routine, or subroutine.
- Audience: architects, designers, software engineers,
project managers, intermediate to advanced programmers, advanced users.
- keywords: echoauto, macro, module, mprint, %oplist, options, parameterized include file, routine, source2, subroutine, testing, verbose
- Information: programs using call execute to:
- call parametized include files and
- predecessor: FreqAll
- provides set of testing programs
- provides examples to implement demo version of FreqAll as
- parameterized includes
- options echoauto, mprint, source2 and verbose
- using %sysfunc(getoption(<OptName>)) to test option values in programs
- using parameterized includes
- using macros
- using call execute to call macros
- using call execute to call parameterized includes
- using call execute with macro function nrstr
Download the Writing Testing-aware Programs zip file that contains 46 programs
- programs shown in paper
- R&D demo programs
- .bat for each .sas
- .pdf: Fehd-Writing-Testing-Aware-Programs.pdf 20 pages
- Macro CallMacr
- Macro CallText
- Processing Data Sets
- Processing Variables
- Routine CxInclude
- Routine CxMacro
- see also:
-- created by User:Rjf2 30 July 2007
--Ronald_J._Fehd macro.maven == the radical programmer 07:39, 24 June 2012 (EDT)