BookmarkSubscribeRSS Feed
elwayfan446
Barite | Level 11

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.

10 REPLIES 10
ChrisHemedinger
Community Manager

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

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
elwayfan446
Barite | Level 11

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.

ChrisHemedinger
Community Manager

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

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
elwayfan446
Barite | Level 11

@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

 

 

Reeza
Super User

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

elwayfan446
Barite | Level 11

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.

ChrisHemedinger
Community Manager

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.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
elwayfan446
Barite | Level 11

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.

elwayfan446
Barite | Level 11

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.

 

elwayfan446
Barite | Level 11

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;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 5809 views
  • 1 like
  • 3 in conversation