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
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.