Posts

Understanding EPOCH Assignment in Clinical Trials: The Pre-Consent Data Challenge

In the world of clinical trials, data management and standardization play crucial roles in ensuring the quality and integrity of research outcomes. One particularly nuanced aspect of this process is the proper assignment of EPOCH values in SDTM (Study Data Tabulation Model) datasets, especially when dealing with pre-consent data. What is an EPOCH? An EPOCH in clinical trials represents a distinct period within the study's planned design. It helps organize and contextualize various events, interventions, and findings that occur during the study. Common EPOCHs include SCREENING, TREATMENT, FOLLOW-UP, and others as defined by the study protocol. Essential EPOCH Characteristics: It is a standardized way to identify different phases of a study Each EPOCH represents a planned element of the study design EPOCHs help establish temporal relationships between different study e...

The Critical Role of ODS LISTING Close Statements in SAS: Avoiding Comment Width Errors

The Critical Role of ODS LISTING Close Statements in SAS: Avoiding Comment Width Errors One of the common challenges SAS programmers face is encountering the error message: "ERROR: Comment width is not between 1 and 200 characters." This error, while seemingly straightforward, can be particularly frustrating when it appears unexpectedly in your SAS log. In this article, we'll dive deep into understanding this error and how proper management of ODS LISTING statements can help you avoid it. Introduction to ODS The Output Delivery System (ODS) in SAS enables users to control the appearance and destination of output generated by SAS procedures. ODS allows output to be directed to various destinations like HTML, PDF, RTF, and the default Listing destination. Proper management of these destinations is critical to ensuring clean output and avoiding errors. Understanding the Error The error message regarding commen...

Power Up Your Data Cleaning with the SAS COMPRESS Function

Power Up Your Data Cleaning with the SAS COMPRESS Function When handling large datasets in SAS, it's common to encounter unwanted characters, extra spaces, or other clutter that can hamper your data analysis. Fortunately, the COMPRESS function helps you clean up your text data efficiently. It can remove, or even keep, specific characters from your strings with minimal effort. Keep reading to learn how you can harness the full potential of the SAS COMPRESS function. 1. Quick Overview of the COMPRESS Function The COMPRESS function in SAS removes (or optionally keeps) certain characters from a character string. Its basic syntax looks like this: result_string = COMPRESS(source_string ); source_string : The original string you want to modify. characters_to_remove (optional): A list of specific characters to eliminate. modif...

Solving Non-Printable Characters in AETERM/MHTERM for SDTM Datasets

Solving Non-Printable Characters in AETERM/MHTERM for SDTM Datasets Solving Non-Printable Characters in AETERM/MHTERM for SDTM Datasets Managing text variables in SDTM domains such as AETERM (for Adverse Events) or MHTERM (for Medical History) can be challenging when non-printable (hidden) characters sneak in. These characters often arise from external data sources, copy-pasting from emails, encoding mismatches, or raw text that includes ASCII control characters. In this post, we’ll explore methods to detect and remove these problematic characters to ensure your SDTM datasets are submission-ready. 1. Identifying Non-Printable Characters Non-printable characters generally fall within the ASCII “control” range: Hex range: 00 – 1F and 7F Decimal range: 0 – 31 and 127 In SAS, you can detect these characters by examining their ASCII values using RANK() , or by leveraging built-in functions like ANYCNTRL() . ...

Learn how to view SAS dataset labels without opening the dataset directly in a SAS session. Easy methods and examples included!

Quick Tip: See SAS Dataset Labels Without Opening the Data Quick Tip: See SAS Dataset Labels Without Opening the Data When working with SAS datasets, checking the dataset label without actually opening the data can be very useful. Whether you're debugging or documenting, this small trick can save you time and effort! 1. Use PROC CONTENTS PROC CONTENTS is the most common and straightforward way to view the dataset label. proc contents data=yourlib.yourdataset; run; The dataset label will appear in the output as the field: Data Set Label . 2. Query DICTIONARY.TABLES or SASHELP.VTABLE For a programmatic approach, use the DICTIONARY.TABLES table or SASHELP.VTABLE view to query dataset metadata. Example Using PROC SQL proc sql; select memname, memlabel from dictionary.tables where libname='YOURLIB' and memname='YOURDATASET'; quit; ...

Leveraging a SAS Macro to Generate a Report on Non-Printable Characters in SDTM Datasets

Detecting Non-Printable Characters in SDTM Datasets Using SAS Non-printable characters in datasets can lead to errors and inconsistencies, especially in the highly regulated environment of clinical trials. This blog post demonstrates how to create a SAS program that identifies non-printable characters in all SDTM datasets within a library and generates a comprehensive report. Why Detect Non-Printable Characters? Non-printable characters, such as ASCII values below 32 or above 126, can cause issues during data validation, regulatory submissions, and downstream processing. Detecting them early ensures the quality and compliance of your SDTM datasets. The SAS Program The following SAS program processes all SDTM datasets in a library and generates a combined report of non-printable characters, including: Dataset name : The dataset where the issue exists. V...

SDTM aCRF Annotation Checklist

SDTM aCRF Annotation Checklist SDTM aCRF Annotation Checklist By Sarath Annapareddy Introduction Creating an SDTM Annotated Case Report Form (aCRF) is a critical step in clinical trial data submission. It ensures that data collected in the CRF maps correctly to SDTM domains, adhering to regulatory and CDISC standards. This checklist serves as a guide to creating a high-quality SDTM aCRF ready for regulatory submission. 1. General Formatting Ensure the aCRF uses the latest SDTM IG version relevant to the study. The document should be clean, legible, and free of overlapping annotations. Page numbers in the aCRF should align with the actual CRF pages. Annotations must be in English, clear, and consistently for...