BookmarkSubscribeRSS Feed
EpiNovice
Calcite | Level 5

Has anyone who uses REDCap had an issue with inputting data using the code provided by REDCap? Specifically with dates not loading properly.

 

If I use the Path Mapper file provided, everything seems to load fine. My issue is that I don't have that for every data set, I just have the CSV file and if I try to load it with the SAS code provided it says I have "invalid data" for every single date variable. 

 

Is there any way to fix this?

4 REPLIES 4
Reeza
Super User
How are you loading the data, are you using SAS DI? You've posted in data management which is typically Data Integration Studio questions. Or are you using SAS EG or Base SAS
ballardw
Super User

@EpiNovice wrote:

Has anyone who uses REDCap had an issue with inputting data using the code provided by REDCap? Specifically with dates not loading properly.

 

If I use the Path Mapper file provided, everything seems to load fine. My issue is that I don't have that for every data set, I just have the CSV file and if I try to load it with the SAS code provided it says I have "invalid data" for every single date variable. 

 

Is there any way to fix this?


You might post the LOG of running the "SAS code provided". Copy from the log the submitted code, invalid data messages and any other messages or errors. Post the log results into a code box opened using the forum's {I} or "running man" icon to preserve formatting (the invalid message usually includes a ruler indicator that gets messed up with the main message windows).

 

The symptom of invalid dates is almost certain an INFORMAT issue but we would need to see the code and the data to determine what needs to be addressed.

pmatheson0
Calcite | Level 5

Yes,

The SAS code provided by REDcap has dates reads in as $500.  In other words actually useless for calculations.

I had to change 3 things in the SAS code provided by REDcap to get it to read in a date properly.

1. Comment out the informat statement provided:

* informat ediary_morning_entry_timestamp $500. ;

2. Create a new informat

informat timestamp e8601dt19.;

3. Comment out the format statement provided.

*format timestamp $500. ;

 

Have fun!

Delgoffe_MCRI
Obsidian | Level 7

I have recently published a macro to export REDCap data into SAS along with formats and a data dictionary. Please see my paper, presentation, and code by filling out this survey: https://redcap.link/REDCapIsMySASFriend.

 

Distribution using this method allows me to distribute only the most recent version, so you can check back to this survey in the future as well.

 

Also available on LexJansen under SESUG 2022: "REDCap: Your SAS Friend for EHR Manual Abstraction"

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1733 views
  • 0 likes
  • 5 in conversation