I've also opened a track on this question
How can I persuade proc format to report (through FMTLIB and CNTLOUT) the full precision of the label returned for a numeric informat range?
With this code you can demonstrate the problem:
proc format cntlout= cntlo ;
invalue testrat XXX = 1.23456789 ;
select @testrat ;
run ;
option nocenter ;
title 'testing cntlout label precision for numeric informat';
title4 "LABEL should be 1.23456789 found %sysfunc( inputn( XXX, testrat ))" ;
proc print width= full ;
id fmtname start label ;
run ;
proc print width=full ;
var fmtname start label ;
format label $hex30. ;
run ;
I am running SAS9.2 on unix so it would be nice to hear if your platform performs better
The major concern I have is the confidence we assume migrating a format catalog between SAS releases and platforms using CNTLOUT on the old platform and CNTLIN on the new.
hth
peterC
I ran your program on windows
AUTOMATIC SYSSCP WIN
AUTOMATIC SYSSCPL W32_VSPRO
AUTOMATIC SYSVER 9.2
AUTOMATIC SYSVLONG 9.02.02M0P011509
AUTOMATIC SYSVLONG4 9.02.02M0P01152009
On windows the LABEL variable is $40 and the value is right justified. $hex30 is not wide enough to display the value.
The title with INPUT function returns this....
LABEL should be 1.23456789 found 1.23456789
What do you get?
data_null_;
thank you for looking at my problem.
my result _was_ a label value, left-aligned, formatted with (I think) best3. (or perhaps best2. ) showing never more than one decimal place.
Starting afresh - in a new sas enterprise guide session, the proper behaviour was restored. (I'll have to get used to making that kind of re-start more often)
Peter
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.