I have a SAS dataset,It has almost 2000 variables,when exported from sas the names of the all the variables are not imported,though values of all the variables are imported. Any help.
I need more information than this. From where are you importing your data and to where are you exporting? Show us some code 🙂
The data was imported into SAS in csv form and after doing some calculation and variable creation,i am trying to export the dataset
from SAS on the same server where sas is installed.
Read the guidance on the post a question below the post button. We cannot see your screen or what you are doing so cannot help.
I guess that you are importing data from Excel (as no-one seems to use good file formats any more) and using proc import. Now in Excel you can have any old nonsense, you can even have pictures an other things. SAS requires the data to be standardised into a good structure and has limits on what variable names can be. Its likely that because the "variable names" you state are not valid, then they are changed to something which is valid, often colX. A robust import process would consist of getting the data into a fixed file format (CSV for instance) then writing a datastep to import that fixed file giving the structure and read commands as you know the data should be.
Try posting a proc contents of the data imported and showing what your issue is.
@kaverisonu wrote:
I have a SAS dataset,It has almost 2000 variables,when exported from sas the names of the all the variables are not imported,though values of all the variables are imported. Any help.
Please rephrase your question
Are you exporting or importing?
If exporting, provide the export code; providing example data (see https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...) may be helpful; since you mention that no names at all are ex(im?)ported, just a few variables will suffice.
ohh yes..typo..i am trying to export.I am trying to export graphically,not using proc export
proc export datafile='....' out=.... dbms=csv replace;
putnames=yes;
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!
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.