Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Home
  • CDMS
  • Castor CDMS Manual
  • Export data
  • Participant Data

Export into SAS in CDMS

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • CDMS
    Castor CDMS Manual Castor CDMS Calculations Manual Frequently Asked Questions Articles for Data Managers Castor CDMS Compliance Release Documents
  • eConsent
    Castor eConsent Manual Castor eConsent Compliance Release Documents
  • SMS
    Castor SMS Manual Castor SMS Compliance Release Documents
  • Castor Connect
    Castor Connect Compliance Release Documents Castor Connect Manual Castor Connect - Participant Quick Start Guide
  • Helpdesk
    News Other Resources Castor products knowledge resources
  • Status page
  • Completing a Study
+ More

Table of Contents

Exporting Data Contents of the export file SAS Export Limitations Values marked as missing Importing Data in SAS Step 1: Import the Formats File Step 2: Import the Study Datasets

SAS is a software suite used for advanced analytics, data management, and statistical analysis. Castor EDC allows you to export collected study data into two SAS-compatible formats: XPT or 7BDAT. Note that the 7BDAT files are generated on a 64-bit Linux machine.

 

This feature is available at no additional cost but must be enabled on a per-study basis. If you would like to use SAS exports, please contact Castor Support at support@castoredc.com and provide your Study ID. Our team will enable the feature for you.

 

 

Exporting Data

Once SAS exports have been enabled, an export can be requested via the Actions menu on the Participants page. More information about requesting can export can be found in the ‘How to export data in CDMS’ article.

When the export is finished, you will receive an email notification with a direct link to download the exported data.

 

Contents of the export file
 

The export file will contain the following files:

  • Log (CSV)
    • Contains information about the exported files and the number of rows exported
  • Mapping Table (CSV)
    • Lists original variable names alongside their sanitized SAS-friendly versions (truncated as needed)
  • Enrichment Report (CSV)
    • Lists the variable names per export file and how they are converted to SAS data types
  • Formats (XPT or 7BDAT)
    • File used to load the data types of the columns into SAS
  • Comments (XPT or 7BDAT)
  • Custom Verifications (XPT or 7BDAT)
  • Field Options (XPT or 7BDAT)
  • Source Data Verification for Steps (XPT or 7BDAT)
  • Study Data (XPT or 7BDAT)
  • Separate Files for Each Repeating Data and Survey (XPT or 7BDAT)
  • Study, Repeating Data, and Survey Variable Lists (XPT or 7BDAT)
     

SAS Export Limitations
 

Converting Castor EDC files for the SAS export must take into account the following limitations in order for the SAS Export to be successful:

  • Please be aware that Study structure element’s names may be adjusted to be suitable with the SAS table format: Names larger than 30 characters will be truncated and will receive a prefix to ensure uniqueness.
  • Make sure that the labels (for example, field labels) do not contain any special characters, as the SAS export will not work when the special characters are present. Here is a list of the non-ASCII characters for your reference. 
  • The SAS 7bdat files are generated in 64-bit Linux environment, therefore they can only be opened on 64-bit Linux environment. If you are using a different environment, we recommend utilizing the XPT files which can be used in any environment.

 

Values marked as missing

Data marked as user missing is exported as -95, -96, -97, -98, -99.

For time fields, user missing data is exported as:

  • 00:00:35 for -95: Measurement failed
  • 00:00:36 for -96: Not applicable
  • 00:00:37 for -97: Not asked
  • 00:00:38 for -98: Asked, but unknown
  • 00:00:39 for -99: Not done

For date fields, user missing data is exported as:

  • 01-01-2995 for -95: Measurement failed
  • 01-01-2996 for -96: Not applicable
  • 01-01-2997 for -97: Not asked
  • 01-01-2998 for -98: Asked, but unknown
  • 01-01-2999 for -99: Not done

For date and time fields, user missing data is exported as:
 

  • 01-01-2999 00:00:35 for -95: Measurement failed
  • 01-01-2999 00:00:36 for -96: Not applicable
  • 01-01-2999 00:00:37 for -97: Not asked
  • 01-01-2999 00:00:38 for -98: Asked, but unknown
  • 01-01-2999 00:00:39 for -99: Not done

For other fields, when applicable, user missing data is exported as:

  • -95: Measurement failed
  • -96: Not applicable
  • -97: Not asked
  • -98: Asked, but unknown
  • -99: Not done

 

Importing Data in SAS

After downloading and unzipping your exported data files, you are ready to import them into SAS. The process involves two main steps:

  1. Importing the Formats File – This step ensures that SAS understands how to interpret variable formats, including user-missing values.
  2. Importing the Study Datasets – This step makes the actual study data accessible for analysis.

 

Step 1: Import the Formats File

The formats file tells SAS about variable data types and user-missing value definitions. You must import this file first to ensure all future dataset imports correctly apply these formats.

 

XPT

/* 
   Load the formats from the catalog file (formats.xpt) in your unzipped export folder.
   Replace <directory name> with the path to your actual folder
   For example "/home/u12345678/sasuser.v94/study_sas_xpt_export_YYYYMMDDHHMMSS/formats.xpt"
*/

proc cimport infile="/<directory name>/formats.xpt" lib=WORK; 
run;

 

7BDAT

/* 
   Create a reference to the folder with your unzipped export data
   Replace <directory name> with the path to your actual folder
   For example: "/home/u12345678/sasuser.v94/study_sas_7bdat_export_YYYYMMDDHHMMSS/"
*/

libname download "/<directory name>/";

/* Load the data catalog (formats.sas7bcat) by pointing SAS to this library */
OPTIONS fmtsearch = (download.formats);

 

Step 2: Import the Study Datasets

Once the formats file is in place, you can import each of your data files. This allows SAS to apply the correct data types and user-missing value definitions automatically.

 

XPT

proc cimport infile="/<directory name>/your_dataset.xpt" lib=WORK;
run;

 

7BDAT

/* 
   Create (or update) a dataset named 'dm' by reading the DM.sas7bdat file 
   located in the 'download' library reference from Step 1
*/

DATA dm;
  set download.DM;
RUN;

 

Once the data has been imported, you can perform your desired analyses using SAS. If you have any questions or require additional assistance, please contact Castor Support.

 

 

edc/cdms sas export

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Import repeating data in CDMS
  • Export and merge data in R in CDMS
  • Formats for data import in CDMS
ISO 27001
FDA - 21 CFR part 11
ICH GCP compliant
HIPAA compliant
CDISC
ISO 9001
gdpr compliant

Products & Industries

  • Electronic Data Capture (EDC)
  • ePRO
  • eConsent
  • Decentralized Clinical Trials (DCT)
  • Clinical Data Management
  • Medical Device & Diagnostics
  • Biotech & Pharma
  • CROs
  • Academic Research

Resources

  • Thought Leadership
  • Blog
  • Castor Academy
  • Knowledge Base

 

Company

  • About Us
  • Careers
  • News
  • Contact Support
  • Contact Us

Legal & Compliance

  • Terms of Use
  • Privacy & Cookie Statement
  • Responsible Disclosure Policy
  • Good Clinical Practice (GCP)
  • ISO Compliance Certificates
  • GDPR & HIPAA Compliance
  • Security Statement

© 2022, Castor. All Rights Reserved.

Follow us on social media


Knowledge Base Software powered by Helpjuice

Definition by Author

0
0
Expand