Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable name length 1

Status
Not open for further replies.

epidtech

Technical User
Dec 26, 2002
12
US
When I run the datastep on a newly imported dataset the variable names are being truncated to 8 characters. The datastep requires the use of the full variable names and has always worked in the past without truncating the orginal variable names, but I'm on a new machine now. I attempted to use
options validvarname=any and options validvarname=v7
Neither of these options worked for me. Any thoughts or suggestions?

thanks
 
epidtech,
Can you post some code, and some of the log results? How are you creating the imported dataset? If you are using a SAS 6.12 import method this may be the reason. Lets look at the code.
One other thing, are you using SAS version 6.12?
Klaz
 
Hi klaz, thanks for the help.
I did check my licenses and they don't expire until 2050 so I don't think that's it. It was a good idea though.
I'm running V8.02
here are some examples of the code I'm running.

LIBNAME SASSYPH 'H:\SAS Data Code';
%include 'H:\SAS Data Code\Morbidity Formats.sas';
OPTIONS VALIDVARNAME=V7;

This would be to import directly from access of course:
(BTW: I am doing all of this in the wizard and then saving the code.)
PROC IMPORT OUT= WORK.ANALYSIS
DATATABLE= "ANALYSIS_TABLE"
DBMS=ACCESS2000 REPLACE;
DATABASE="H:\STDMIS Integration\STDMIS Integration II.mdb";
RUN;

And then when I'm trying to import through excel:
PROC IMPORT OUT= WORK.ATIII
DATAFILE= "H:\110303AT_II.xls"
DBMS=EXCEL4 REPLACE;
GETNAMES=YES;
RUN;

 
epidtech,
Which dataset is giving you short varnames? Is it the one named 'ATIII'? If it is I think that may be due to the fact that the import proc, using the excel4 dbms, has a limit of 8 letters in the varnames' length. (so they say)
Let me know if you discover the problem.

BTW - How do you have a license that expires in 2050?!! Thats amazing!
Klaz
 
Hi Klaz,
I have my SAS through the CDC so they have a liscence that expires in 2050. And yes it is pretty cool.

You were right it is the excel 4 worksheet. I exported it as a 2000 and the variable length worked alright.

Thanks for the help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top