Some ways to encourage quality programming GREG STEFFENS

  • Slides: 13
Download presentation
Some ways to encourage quality programming GREG STEFFENS NOUMENA SOLUTIONS

Some ways to encourage quality programming GREG STEFFENS NOUMENA SOLUTIONS

Encourage (or Discourage) Quality The way we manage SAS programming groups has a big

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

SAS Log Checks A single log file All log files in a specified directory

SAS Log Checks 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 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 …

Why Scan Log Files? Automates the search for a standard list of log messages,

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

File comparison Performs a smart comparison of all same-named files in two directories and

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, ADa. M, TFLs, to be sure there is no common code used by both programmers Can be used to compare program files, reports, etc. Noumena Solutions

Finding called macros Finds all SAS macro calls that exist in SAS program files

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

Checking Datetimes of files Checks datetimes of SAS program, log and lst files to

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

SAS library Comparison Compares all members in two SAS libraries, of the same or

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

Define xml Data. Type Text Integer Float Datetime Date Time partial. Date partial. Time

Define xml Data. Type Text Integer Float Datetime Date Time partial. Date partial. Time partial. Datetime incomplete. Datetime duration. Datetime Char Num Char Char Noumena Solutions

Define xml Significant. Digits Business Rule: When Data. Type is float both Length and

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

Programmatic Derivation from Data The Data. Type and Significant. Digits can be programmatically determined

Programmatic Derivation from Data The Data. Type and Significant. Digits 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 whethere 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

 The paramrel variables need to be defined for each TESTCD or PARAMCD value

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 These are required for VLM too

Greg Steffens Noumena. solutions@gmail. com Noumena Solutions

Greg Steffens Noumena. solutions@gmail. com Noumena Solutions