BookmarkSubscribeRSS Feed
Peter_C
Rhodochrosite | Level 12
Hi

dictionary.formats (aka sashelp.vformat) provides more than just a (very) useful list of (in-)formats. It also indicates min/max/default widths for each format.

A very neat feature is that it includes all user formats (within the visibility defined by the system option FMTSEARCH).

I just noticed that the only examples of user defined formats I have checked, do not provide the min/max/default widths - just zero.

Is this something I don't understand, or a defect to refer to SAS Support?

PeterC
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
If you can get the information when you do a CNTLOUT= or PRINT/FMTLIB option to display the contents of a user format, I would say that you should see the equivalent information from the DICTIONARY / SASHELP perspective, as well. My own test revealed the same symptom you reported, for both SAS 9.1.3 and 9.2. Sounds like a SAS support track opportunity - go for it!

Scott Barry
SBBWorks, Inc.
ArtC
Rhodochrosite | Level 12
Since I have never actually needed these values it never bothered me sufficiently to ask. Certainly the information is available, we see it when we use the CNTLOUT. The MIN= and MAX= options (on the VALUE and INVALUE statements) have some effect on the stored min/max values (as shown by the CNTLOUT), but not on those seen in the VIEWs.
Peter_C
Rhodochrosite | Level 12
These values are available, so I'll get them together. It is just less convenient.

Brought tegether, the information provides the foundation of a nice demo of what a format might provide and how width on the format influences the result.
For the built-in formats, there are some interesting variations, but only truncation on the user-defined formats I've checked so far.

When finished, it'll make a nice short paper-type demo.
Peter

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 3 replies
  • 1753 views
  • 0 likes
  • 3 in conversation