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 data from CSV 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

Code Import data directly from your folder

Learn how to easily export data from a CSV file into SAS in Castor CDMS. If you would like to export data directly in the SAS format, please visit the article Export into SAS.

First export your data with the export type 'CSV'. 

From here there are two ways to import your Castor data in the CSV files into SAS:

  1. Code
  2. Import data directly from your folder

Code

  1. Move the CSV file in a directory/folder that you can easily find back.
  2. Open a new Program by clicking on the new file icon under "Server Files and Folders, then click "SAS Program (F4)":
  3. Paste the following code in the right panel.
    %web_drop_table(WORK.IMPORT);
    
    FILENAME REFFILE '/folders/myfolders/sasuser.v94/test.csv';
    
    PROC IMPORT DATAFILE=REFFILE
    DBMS=CSV
    OUT=WORK.IMPORT;
    GETNAMES=YES;
    DELIMITER=";";
    RUN;
    
    PROC CONTENTS DATA=WORK.IMPORT; RUN;
    
    %web_open_table(WORK.IMPORT);
  4. Replace the file path '/folders/myfolders/sasuser.v94/test.csv' with your own file path.
  5. Depending on your system, your CSV file is delimited by comma (,) or by semicolon (;). You can check this by opening the file with a text editor application like Notepad or TextEdit, or just try to import first and see how your data import looks like. If your data is delimited by commas, replace the line 'DELIMITER=";";' with 'DELIMITER=",";'
  6. Click on the running man icon or press F3.

Import data directly from your folder

  1. Add the csv file into your 'sasuser' folder (directory).     
    1. If you're not sure where this folder is located, open a new Program by clicking on the new file icon under "Server Files and Folders, then click "SAS Program (F4)":
    2. Paste the following code in the right panel and click on the running man icon or press F3.
      %put My SASUSER folder is %sysfunc(pathname(sasuser));
  2. Click on "Server Files and Folders Pane" in the left panel.
  3. Navigate to the folder where your CSV file is stored.
  4. Right click on your CSV file and click "Import Data".
  5. Depending on your system, your CSV file is delimited by comma (,) or by semicolon (;). You can check this by opening the file with a text editor application like Notepad or TextEdit, or just try to import first and see how your data import looks like.    
    1. If your CSV file is delimited by semicolon, click on "Code/Results" in the right panel. The code that is used for importing data is shown in the sub tab "Code".
    2. Click on "Edit" in the sub tab "Code".
    3. Add the following line under PROC IMPORT:
      DELIMITER=";";
    4. Your code will look like the screenshot below. Click on the running man icon or press F3.
    5. Navigate to "OUTPUT DATA" to see your imported data.
sas import csv export

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Formats for data import in CDMS
  • Merge study and repeating data/survey data files in SPSS in CDMS
  • Export and merge data in R in CDMS
  • Import repeating data 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