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.
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
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.
Did you check the Overwrite existing files checkbox? Can you post a little bit of the log to help?
@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
For the missing variables - how long are the names? Over 32 characters?
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.
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.
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.
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.
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.
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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.