Montura Consulting   Research & Development
Developers Playpen

SAS Object Framework

SAS Object Development Tools

If there are any errors please send me the log and description of the issue: kevin@montura.com.


SAS/Macro Framework

Playpen setup and invocation for macro is simple.

  • OPTIONS MAUTOSOURCE SASAUTOS=('C:\any-dir-name');
    %anymacroname;

Refactor - how you think about architecture and programming patterns, also known as techno-babble that defines "how it works" from the perspective of your non-technical boss. Mentally put aside everything you know and practice when its comes to refactoring existing code, how you organize, indent, and document. Forget about documentation standards too. Clear your mind...this should be really easy if you work in a cube.

SAS object programming relies on four types of structure.

System Structure is what has to be in place so you can just start a SAS session and submit source code.

Application Structure is the repository where your SAS program code is located.
  • The object repository is a SAS catalog.
  • The macro repository is the operating system folder.

Drive Structure is code that executes each logical step in your SAS program, checks a global variable that indicates error, and stops the application from submitting/executing more SAS code when an error is detected.

Common Data Structure is a container for specific categories of data. Session structure would contain variables for database name, password, port, and other variables that remain static for the entire session. Row structure would contain all numeric and character variables from one row in a SAS dataset. Click structure may contain the row number, selected value, and visibility status for every widget on every Frame.

SAS object programming relies on four types of relationship.

Status Relationship is a global variable that connects every drive structure in every SAS object. As a precondition to normal execution, the global variable is read by every SAS object and SAS/Frame widget. As a post-condition, the global variable is set to indicate a specific error condition following each block of SAS code.

Repository Relationship is listing that indicates the sequence of execution for every SAS object in the repository. When multiple repository are in play additional qualifiers indicate which repository has precedence. This data exist is kept physically separate from SAS objects and Base/SAS code. You have the option to use a SAS dataset or SAS catalog SLIST entry.

Common Property/Common Data Relationship is created at runtime when the pointer for each Common Data Structure is assigned to a predetermined property in each SAS instance. You have the option to assign pointers based on matching name, matching property metadata, or some other customized assessment.

Interpreted Code, Compiled Code Relationship is the hot little item that gives SAS object programmers an instant advantage over every other programming language, including Base/SAS, when used in combination with the first three relationships. The primary control advantage is the ability apply granular controls over the decision to execute or terminate the entire session. The primary QA advantage is the ability to extract messages and alert test that is need by QA teams when the system crashes. The primary analytics advantage is the ability to replicate one SAS analysis model and run any number of permutations in parallel, without overlap contamination.


Refactor - how you think about writing source code. Every SAS object application will have the following three components. All three can be coded into physically separate SAS catalogs.

Controller is the system structure that sets the environment with global variables, exist checks on files/folders/datasets, and other global actions so SAS object programs can "just work".

SAS Object is your everyday SAS program, wrapped in SCL instead of Macro. If you take the time to count lines of code you will find that 80% to 90% of your object-oriented code is actually Base/SAS.

External Program Work List is the dataset or SLIST that defines every single SAS program used in your application. A search conducted on your code should turn up zero include statements and zero parent-child instantiations outside of the controller.

One Logical Step returns a single pass/fail when running continuously in some auto-test facility like Jenkins. The idea is to code each SAS object to represent one logical step that may contain any number of internal steps that contribute to a single pass/fail.


COPYRIGHT © 1989 - 2011 Montura, Inc.
All rights reserved. This material may not be published, broadcast, rewritten or redistributed.
All material on this website is drawn directly from US Patent Repository Relationship Programming
7,984,422
Reading any page on this website is the same as reading patent US 7,984,422 |
Call 510-798-8367 to obtain you license for use today.
Violators will be prosecuted and perhaps persecuted with undesirable press release news as well..

Terms & Conditions -- Privacy Policy