DATA Step, Macro, Functions and more

How to tell if a format is a picture format?

Reply
N/A
Posts: 0

How to tell if a format is a picture format?

Given a format name (assuming it's not a nesting format for simplicity), how can I know if it's a picture format or not?

For a user-defined format, I can easily dump its definition into a dataset by the CNTLOUT option of PROC FORMAT, then the format is a picture format if there is a 'P' in column TYPE of that dataset.
However, the above method won't work for a SAS built-in format, since the name of the catalog that contains a built-in format is not shown in either dictionary.tables (or sashelp.vformat) and I cannot dump its definition with the CNTLOUT option.
Valued Guide
Posts: 2,175

Re: How to tell if a format is a picture format?

is there a purpose behind this question (which I don't think can be answered)?
We might be able to help if we knew your purpose or the use you might make of the information.

hth
PeterC
N/A
Posts: 0

Re: How to tell if a format is a picture format?

Never mind, I just wanted to assume non-picture formatted numeric variables are categorized by their formatted values, while picture formatted numeric variables are continuous. If there's no way to tell it, I'll just hard code the variable types --- for example, a variable name with an 'i.' prefix means categorical, otherwise continuous.
Ask a Question
Discussion stats
  • 2 replies
  • 111 views
  • 0 likes
  • 2 in conversation