03-10-2016 12:13 PM
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.
03-10-2016 12:17 PM
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.
03-10-2016 12:28 PM
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.
03-10-2016 01:36 PM
@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"
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
03-10-2016 01:44 PM
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.
03-10-2016 02:40 PM
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.
03-10-2016 02:41 PM
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.
03-10-2016 03:36 PM
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.
From the article... I simply dropped the labels.
proc datasets lib=work memtype=data; modify class; attrib _all_ label=' '; attrib _all_ format=; run;