I can’t find a way to enter the description for a format when I’m defining the format with PROC FORMAT.
The only method that I could find for entering the description of a format is by using PROC CATALOG after the format is already defined.
Is that right?
The “description” to which I’m referring is the text in the “Description” field in the results of PROC CATALOG
I think you are correct. The description you refer to is a general attribute on all catalog entries such as macros, graphs and so on and is not specific to formats. Hence you can only display or modify it using PROC CATALOG or CATALOG window:
PROC CATALOG CATALOG = LIBRARY.FORMATS;
MODIFY MyFormat FORMAT (DESCRIPTION = "My Format Description") ;
CONTENTS;
RUN ;
QUIT;
Using PROC FORMAT FMTLIB will not print out the catalog entry description.
I think you are correct. The description you refer to is a general attribute on all catalog entries such as macros, graphs and so on and is not specific to formats. Hence you can only display or modify it using PROC CATALOG or CATALOG window:
PROC CATALOG CATALOG = LIBRARY.FORMATS;
MODIFY MyFormat FORMAT (DESCRIPTION = "My Format Description") ;
CONTENTS;
RUN ;
QUIT;
Using PROC FORMAT FMTLIB will not print out the catalog entry description.
Thank you for confirming
Just a small comment about the example above: "MODIFY MyFormat FORMAT" should probably be "MODIFY MyFormat", and it might need the /entrytype= option after the description
I'm getting ready to submit a SAS Ballot Idea for this, but I want to check if I'm missing anything.
What I really want to do is to identify the person who modified the format catalog.
Some operating systems identify the person who created the file but not the person who modified it.
I would like to write the &sysuserid of the person who runs the PROC FORMAT into the description of the format.
Is there another way to identify the person who modified one format in the catalog?
Ideally, the sysuserid would be automatically written into the catalog -- in the same way that the date-time stamps are written automatically.
I didn't test the code but posted from a paper I found
It would certainly make sense to have a FORMAT description that you can display or modify in PROC FORMAT itself.
I submitted a ballot idea for this: Format Description at the Time of Definition
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.