BookmarkSubscribeRSS Feed
gzr2mz39
Quartz | Level 8
Instead of using IDX (eg IDX1, IDX2, etc) as an anchor I would like to use the values of the "city" variable (eg avalon, azusa, fort irwin, etc).
How do I do this?

ods html path='C:\Documents and Settings\Output\'
body='cityinfo.html'
anchor='IDX1'
title1 j=c "#byline";
options nobyline;
proc print data=test noobs label;
by city;
var day zip;
run;
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi
The ANCHOR= option creates numbered NAME attributes that all start with the same prefix string...so IDX1,IDX2, IDX3 or PILOT1, PILOT2, or PILOT3.

To do what you want to do (have each NAME attribute be a different city), you would need to move into the world of SAS Macro processing and in addition, investigate how to append content to an HTML file using the NO_TOP_MATTER and NO_BOTTOM_MATTER sub options.

However since you can probably predict what by group will get which IDX#, do you really need this level of control???

Cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 904 views
  • 0 likes
  • 2 in conversation