BookmarkSubscribeRSS Feed
Matt3
Quartz | Level 8

Hi,

 

Could anyone please tell me how to read into sas csv file wich is attached in eml(email) file?

 

Thank you

6 REPLIES 6
PeterClemmensen
Tourmaline | Level 20

Why not just download the CSV file and import it into SAS like any other CSV file?

Matt3
Quartz | Level 8
It`s repetitive process.
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Several points here.  First, email is not an adequate data transfer medium, both from the fact it is unsecure (even possible just within the company), is secondly not necessarily checked to ensure data delivered is the same as sent, and thirdly open to limitations due to email size.  For data transfers use an sftp method, or secure portal.

Now in theory you could parse that file type and get the info, then drag out the file from there, but its not a good idea.  Get the file through a proper source - sftp, secure portal - save to version controlled secure environment.  Then have SAS read the plain text csv file from the version controlled secure enviroment.

Matt3
Quartz | Level 8

This  is only way we can do that automaticly...csv files are going to be encrypted, however files will not contain personal data.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

CSV cannont be encrypted - CSV is a plain text file format with data delimited by commas.  What I suspect you mean is that the file will be WinZipped, and password protected.  Seen this many times, and it is a bit of joke really, someone who can intercept an email cant intercept the next email with the password?

Anyways, due to that you then have other layers, such as unzipping it, and as your not using a proper secure portal, you would need to run an md5 check to ensure the data is received as sent (all of which will be detailed in the data transfer agreement I would imagine).  It would then be a manual process to open the email, save the file, use the password to unpack the zip, then SAS can read the actual data.  So much more work than a simple sftp setup or secure portal (which your company likely already has).

 

Maxim 14:

https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers...

Matt3
Quartz | Level 8

The problem is this is external data(which not contain sensitive information about customer) sending from our provider, they are not going to send us this files any other way :(.

But Maxim 14 was useful, I ve already solve the problem with Python.

 

Thanks 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1180 views
  • 0 likes
  • 3 in conversation