Presentation is loading. Please wait.

Presentation is loading. Please wait.

Some ways to encourage quality programming

Similar presentations


Presentation on theme: "Some ways to encourage quality programming"— Presentation transcript:

1 Some ways to encourage quality programming
Greg steffens Noumena solutions

2 Encourage (or Discourage) Quality
The way we manage SAS programming groups has a big impact on programmers attitudes about quality Decisions about process and technology communicate to them what the real attitude is about quality Actions speak much more loudly than words when it comes to management. Mission statements, SOPs, values statements don’t have the impact that actions have. Let’s talk about a few easy things that can be done to encourage quality attitudes in a programming group … or discourage quality in a group by taking contrary actions Noumena Solutions

3 SAS Log Checks A macro that searches log files for a list of text strings that I created over the years - is the shortest list to find all the issues in SAS log files Automatically runs every time a SAS program is submitted Can also be run for … A single log file All log files in a specified directory All log files defined in an input data set All log files in a list of directories Can create an html report and an output data set A permanent record of the log scan is very important to audits Run by programmer, validation programmer, manager, etc. Reusable macros should not result in any of these messages Noumena Solutions

4 Why Scan Log Files? Automates the search for a standard list of log messages, instead of manual and inconsistent searches Supports search for any set of messages in the SAS log by augmenting or overriding the default list SAS log files can become very large, especially when running more intelligent macros, making manual review time consuming and error prone Messages are generated for a reason. They indicate a probable problem with the output Programming should be clean, especially when submitting to the FDA or if you work for a CRO providing code to a client Noumena Solutions

5 File comparison Performs a smart comparison of all same-named files in two directories and similar-named files with prefixes Displays a metric of how different files are E.g. comparing production to validation programs that create SDTM, ADaM, TFLs, to be sure there is no common code used by both programmers Can be used to compare program files, reports, etc. Noumena Solutions

6 Finding called macros Finds all SAS macro calls that exist in SAS program files Can be used to ensure a production and validation programmer don’t use the same macros Noumena Solutions

7 Checking Datetimes of files
Checks datetimes of SAS program, log and lst files to ensure that the program was not changed after it was run Confirms the output file was created after the program file was last changed Noumena Solutions

8 SAS library Comparison
Compares all members in two SAS libraries, of the same or similar names Can lookup primary key variables to add an ID statement to the proc compares that are run for each data pair Compares SAS catalog entries, as well as data sets Creates a lst output and an output data set Noumena Solutions

9 Define xml DataType Text Char Integer Num Float Num Datetime Char
Date Char Time Char partialDate Char partialTime Char partialDatetime Char incompleteDatetime Char durationDatetime Char Noumena Solutions

10 Define xml SignificantDigits
The number of digits following the decimal point in a floating point number. Business Rule: When DataType is float both Length and SignificantDigits must be provided. Noumena Solutions

11 Programmatic Derivation from Data
The DataType and SignificantDigits can be programmatically determined from the data sets Consideration of the SAS variable type and assigned format is part of this derivation Looking at character variable values can determine whether there is an ISO date being stored. Also, map metadata can assist with this as well, since many ISO dates are created from SAS date and datetime source variables Metadata describing data standards can also be used Variable naming conventions can be used but as a last resort. This is not a good design because it becomes unreliable. Noumena Solutions

12 These are required for VLM too
The paramrel variables need to be defined for each TESTCD or PARAMCD value Paramrels: orres oresu stresn stresc stresu, position, location, etc. So it isn’t as easy as looking at the variable type in SAS The values have to be considered as a set of values in a virtual variable being described If you don’t fully support VLM, you don’t support define 2.0 Noumena Solutions

13 Greg Steffens Noumena Solutions


Download ppt "Some ways to encourage quality programming"

Similar presentations


Ads by Google