08-13-2012 04:39 PM
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';
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.
02-10-2016 12:05 PM - edited 04-05-2016 06:07 AM
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.
02-11-2016 02:28 PM
02-11-2016 03:31 PM - edited 02-11-2016 03:33 PM
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).