Using the EDITTAGS Macro

The SAS data set that contains your tag customization information can have as many observations as necessary to create, modify, and delete tag descriptions. The EDITTAGS macro processes each observation in the data set. It saves the changes to the tags list only if no errors occurred.

Example: Customizing Tags in Batch Mode

To create the customized tag list, we must first create a SAS data set that contains an observation for each tag description we want to create, modify, or delete.

Each observation must contain a column for:

In this example, we are going to create a custom set of tags using the EDITTAGS macro. Our customizations will add two new tag descriptions, delete an existing tag description, and change the HTML tags that are associated with an existing description.

The two tag descriptions we will create are:


applies a font color of blue to the output element that uses this tag description.

contains style information that underlines the text of the element that uses this tag description.

We will also delete the strong tag description and change the HTML tags associated with the emphasis tag description.

Here's what our DATA step looks like.

   data mytags;
   length tag $8
          act $6
          start end $38;
   input @1 tag @10 act @18 start $char38. @57 end;
   mytitle  add     <font color=blue>                      </font>
   emphasis modify  <i><b>                                 </b></i>
   strong   delete  .                                      .
   myfoot   add     <p style="text-decoration: underline"> </p>

After we have created our DATA step, we can run the EDITTAGS macro and create our customized tags list. The macro invocation required for this data set is:

   %edittags (data=mytags,

When the macro completes successfully, the changes indicated in our data set are made to the tags list. The modified tags are written to SASUSER.HTMLGEN.TAGS.SLIST. (Remember that the default list provided with the Formatters is SASHELP.HTMLGEN.TAGS.SLIST.)