Desktop productivity for business analysts and programmers

Download Data Files to PC task

Reply
Frequent Contributor
Posts: 141

Download Data Files to PC task

When I used the "Download Date Files to PC" task in EG 6.1, I notice that the dataset that is downloading to my PC is missing several variables of the dataset on our server.  I can't figure out why this is happening.  Has anyone ever seen this before?  Also, it appears to be naming the variables that it is downloading to the actual field names of the tables in the database I used to create the dataset.  It is not using any of the aliases in the actual dataset.

Community Manager
Posts: 2,887

Re: Download Data Files to PC task

Are you sure that you're downloading the data set you mean to, and not the original source data?  The task will allow you to download a database table (creates a SAS data set first).  The task generates a log output that should contain more details about where the data originates and what's going on.


Chris

Frequent Contributor
Posts: 141

Re: Download Data Files to PC task

Yes, it's very strange.  I tried deleteing the dataset and recreating it.  I created a new dataset with a new name on the server.  The data looked perfect but when I downloaded it the same thing happened.  Missing variables and database names.

Community Manager
Posts: 2,887

Re: Download Data Files to PC task

Did you check the Overwrite existing files checkbox?  Can you post a little bit of the log to help?

Frequent Contributor
Posts: 141

Re: Download Data Files to PC task

@ChrisHemedinger Here is the log.  Not much there.

 

Copying SAS data files to M:\NECD\Group\PFS\mortgage\MSR Reporting\SAS Data Sets

Connecting to server "SASApp"
Copied "MSRACQ.MSR_DIGEST_MSP_TEST"
   to "M:\NECD\Group\PFS\mortgage\MSR Reporting\SAS Data Sets\msr_digest_msp_test.sas7bdat"
Copied 70,516,736 bytes in 137.00 seconds.

Total transfer: 70,516,736 bytes in 137.00 seconds
Total number of files processed: 1

 

 

Super User
Posts: 19,057

Re: Download Data Files to PC task

For the missing variables - how long are the names? Over 32 characters?

Frequent Contributor
Posts: 141

Re: Download Data Files to PC task

Nothing is over 32 characters long.

 

 

After looking at the dataset further, it appears the variables are all there.  Howver, the very first variable in the new dataset is named nothing like the original dataset.  It is actually similar to another variable.  I am playing around with changing the aliases to see if that changes anything but this is very strange.

Community Manager
Posts: 2,887

Re: Download Data Files to PC task

What are you using to examine the downloaded data set?  EG? SAS Universal Viewer?  Do you have SAS installed on your local PC?  Without a local SAS, sometimes data can appear different.  If your data uses user-defined formats the data values can appear different as well.

Frequent Contributor
Posts: 141

Re: Download Data Files to PC task

Yes, I have local sas installed on my PC with EG 6.1 as well and I was looking at the new dataset with both.

Frequent Contributor
Posts: 141

Re: Download Data Files to PC task

Ok, I have figured out what is going on but not quite sure how to fix it.

 

When I am using a proc sql statement to pull from another SAS dataset it is pulling in the label from that dataset as show here.

 

2016-03-10_13-33-30.png

The labels are what is showing up when I create the new dataset, even though I am giving the column the alias you see on the left.  Somehow those labels are being passed through from the original dataset in the proc sql select from statement.

 

Frequent Contributor
Posts: 141

Re: Download Data Files to PC task

While I never figured out how the query was pulling in labels from the original dataset, I did find the way to remove them from my new dataset after it is created and before I download it.

 

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003185567.htm

 

From the article... I simply dropped the labels.

 

proc datasets lib=work memtype=data;
   modify class; 
     attrib _all_ label=' '; 
     attrib _all_ format=;
run;
Ask a Question
Discussion stats
  • 10 replies
  • 1025 views
  • 1 like
  • 3 in conversation