BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
somebody
Lapis Lazuli | Level 10

I am running regressions in a Macro, and after each regression, the estimates are appended to a dataset (COEFF). So, the length of the first variable (name of the parameter) is set after the first regression. This gives an issue where if parameters' names of later regressions are longer, they will be cut down, giving this WARNING message :

Variable Parameter has different lengths on BASE and DATA files (BASE 13 DATA 18).

I use the following code to append datasets after each regression:

PROC datasets nolist; append base=coeff data=temp force; RUN; 

where coeff does not exist before running any regression, temp is the parameter estimates of the current regression

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

In the regression use the NAMELEN option on the PROC statement to set the length so that its not truncated. You can also examine the PARMLABEL option to see the formatted label. 

 

And you cannot change the length via PROC DATASETS

 

You cannot change the length of a variable using the LENGTH statement or the LENGTH= option in an ATTRIB statement.

http://documentation.sas.com/?docsetId=proc&docsetTarget=p16vqq5oedlmkin1373cqyalhpo6.htm&docsetVers...

View solution in original post

1 REPLY 1
Reeza
Super User

In the regression use the NAMELEN option on the PROC statement to set the length so that its not truncated. You can also examine the PARMLABEL option to see the formatted label. 

 

And you cannot change the length via PROC DATASETS

 

You cannot change the length of a variable using the LENGTH statement or the LENGTH= option in an ATTRIB statement.

http://documentation.sas.com/?docsetId=proc&docsetTarget=p16vqq5oedlmkin1373cqyalhpo6.htm&docsetVers...

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 4089 views
  • 0 likes
  • 2 in conversation