DATA Step, Macro, Functions and more

dictionary.formats

Reply
Valued Guide
Posts: 2,177

dictionary.formats

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
Super Contributor
Super Contributor
Posts: 3,174

Re: dictionary.formats

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.
Valued Guide
Posts: 634

Re: dictionary.formats

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.
Valued Guide
Posts: 2,177

Re: dictionary.formats

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
Ask a Question
Discussion stats
  • 3 replies
  • 174 views
  • 0 likes
  • 3 in conversation