BookmarkSubscribeRSS Feed
tradepeter
Calcite | Level 5

Hello all:

  I am trying to create a format dataset from proc format using cntlout. I use SAS version 8. This is my code:

proc format cntlout=myformat;

value patientgroup_f 0 = 'Case'

              1 = 'Control';

run;

However, this is the warning I get

NOTE: The format name 'PATIENTGROUP_F' exceeds 8 characters. Only the first 8 characters will be used.

It appears that the format name is too long so SAS truncate it to 8 characters. Is there any way to disable this behavior so that the full format name will be stored.

Thanks,

Peter

4 REPLIES 4
art297
Opal | Level 21

Upgrade to a newer version of SAS.  You pay the same whether using an old, outdated, or newer version.

loredana
SAS Employee

Open Base SAS and go to TOOLS -> OPTIONS -> SYSTEM -> FILES -> SAS FILES.

There is an option called VALIDFMTNAME. Right-click on it and select Modify Value.

I'm not sure what your options will be for SAS v8, but make sure you try defining your format under every option specified.

If it doesn't work, your only solution is to upgrade.

LinusH
Tourmaline | Level 20
@loredana, I think the warning is because of the format name, not a variable name. And if I recall right, the 8 char long format name restriction were lifted in V9. So no option will help in this situation, upgrading will.
Data never sleeps
loredana
SAS Employee

Thank you for pointing that out. I modified my initial post. I initially believed VALIDVARNAME would specify the length of any SAS name, not just for SAS variable names. I see now that there are slight variations of this option: SAS var names (VALIDVARNAME), members (VALIDMEMNAME) and format names (VALIDFMTNAME).

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1372 views
  • 1 like
  • 4 in conversation