Help using Base SAS procedures

Format Description at the Time of Definition

Accepted Solution Solved
Reply
Contributor
Posts: 74
Accepted Solution

Format Description at the Time of Definition

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


Accepted Solutions
Solution
‎06-18-2016 11:47 AM
Super User
Posts: 3,102

Re: Format Description at the Time of Definition

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. 

View solution in original post


All Replies
Solution
‎06-18-2016 11:47 AM
Super User
Posts: 3,102

Re: Format Description at the Time of Definition

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. 

Contributor
Posts: 74

Re: Format Description at the Time of Definition

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.

Super User
Posts: 3,102

Re: Format Description at the Time of Definition

I didn't test the code but posted from a paper I found Smiley Happy

 

It would certainly make sense to have a FORMAT description that you can display or modify in PROC FORMAT itself.

Contributor
Posts: 74

Re: Format Description at the Time of Definition

I submitted a ballot idea for this: Format Description at the Time of Definition

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 421 views
  • 3 likes
  • 2 in conversation