Presentation is loading. Please wait.

Presentation is loading. Please wait.

© OCS Consulting 1 SAS Macro Version Control Jim Groeneveld, OCS Consulting, Rosmalen, the Netherlands. 066-2007 – SGF 2007.

Similar presentations


Presentation on theme: "© OCS Consulting 1 SAS Macro Version Control Jim Groeneveld, OCS Consulting, Rosmalen, the Netherlands. 066-2007 – SGF 2007."— Presentation transcript:

1 © OCS Consulting 1 SAS Macro Version Control Jim Groeneveld, OCS Consulting, Rosmalen, the Netherlands – SGF 2007

2 © OCS Consulting 2 SAS Macro Version Control CONTENTS Numbering, fixes, adds, new bugs Backwards (in)compatibility Version control: stopping version Running version: backward supp. Backward call, version distribution Main version distribution macro Distributing macro advantages

3 © OCS Consulting 3 SAS Macro Version Control Numbering, fixes, adds, new bugs Major.Minor.Patch[.Build] number; develop from 0.0.0; 1 st release 1.0.0; newer versions may fix bugs and add features, are backwards compatible; newer versions may have new bugs or may not be backwards compatible; archive programs with versions used, prevent running them with newer vs..

4 © OCS Consulting 4 SAS Macro Version Control Backwards (in)compatibility Backwards incompatibility: changed or removed arguments; changed parameter defaults; changed or removed parameter values with specific meanings; changed parameter functionality. Best to avoid backwards incompatibility.

5 © OCS Consulting 5 SAS Macro Version Control Version control: stopping version Version argument with vs number:, Version = 2.7.3k /* current vs */ Process user specified version value: %IF (&Version NE &CurVs) %THEN %DO; %PUT *** &MacName *** &ERR: Specified vs. &Version does not match &CurVs; %GOTO Finish; %* Do not run this vs.; %END; %* User fetches older macro;

6 © OCS Consulting 6 SAS Macro Version Control Running version: backward support Alternative actions with backward incompatibilities: reproduce behaviour of older macro; support outdated argument names; control system that automatically fetches and uses older/any version: backward call, version distribution!!! Programs validated with older versions.

7 © OCS Consulting 7 SAS Macro Version Control Backward call, version distribution Based on other version control system: unique, numbered file and macro name for each version, e.g. ‘macro201’; directly called by numbered name. Backward call, version distribution: last version also has numbered name; distributing macro has main name; numbered versions support stopping.

8 © OCS Consulting 8 SAS Macro Version Control Main version distribution macro version argument (all versions); main supports _all_ arguments of older versions by way of PARMBUFF option; version parameter value is determined dependent on user specified version the right macro version is called with user specified &SYSPBUFF parameters; no version specification: last version. %AnyMacro(Data=_LAST_, Version=1.0.1a);

9 © OCS Consulting 9 SAS Macro Version Control Distributing macro advantages no need for explicit support of arglist; only user specified parameters passed; main has knowledge about versions; slight adaptation if new macro version; a version nr may represent compatible ones of which the newest is chosen; default (no vs spec) always newest vs; any version callable at any time.

10 © OCS Consulting 10 Questions and Answers QUESTIONS & ANSWERS

11 © OCS Consulting 11 Q&A : origin Origin of presentation experience with writing and validating standard SAS macros; collection of encountered and invented ideas on recommendations; observed weaknesses in (macro) program code in practice; felt need to improve quality of code; the need to keep older (validated) macro versions available.


Download ppt "© OCS Consulting 1 SAS Macro Version Control Jim Groeneveld, OCS Consulting, Rosmalen, the Netherlands. 066-2007 – SGF 2007."

Similar presentations


Ads by Google