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

sas-innovate-2024.png

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.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 993 views
  • 0 likes
  • 3 in conversation