BookmarkSubscribeRSS Feed
Yennie
Calcite | Level 5
Hey all...

I have written this piece of code to create a frameset for my html pages... however the frame page is showing up as a blank page...

%Let dir = \\int\Collaborate\PI\Portfoli\PI-Pricing\Risk & Operations\Asset Risk\PROJECTS\VOR Monthly Report Tool\HTML;
%Let frameset = gio_frame.html;
%Let leftframe = gio_inforce_leftframe.html;
%Let righttopframe = rightf_all.html;
Filename gioframe "&dir\&frameset";
Data _Null_;
File gioframe;
Put '';
Put '';
Put '';
Put '';
Put '';
Put '';
Put '';
Put '';
Put '';
Run;

does anyone know the reason why it's blank?

cheers
yennie
3 REPLIES 3
Yennie
Calcite | Level 5
and i forgot to mention it's
%Let output = results.html;

cheers,
yennie
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
With your SAS code, I expect you are getting some type of SAS execution/compilation error, which would be most useful to share.

You will likely find the problem having to do with using quoted-strings and macro variables. A PUT statement will not resolve a macro variable when used with a single-quoted literal. So you need to use double-quotes but since the HTML tag syntax also requires quotes, you must duplicate your quote character for each instance where you want a double-quote to be generated, such as:

1 %let my_quote = Yes, The New Orleans Saints won the Super Bowl!;
2 data _null_;
3 putlog "Hello - I say to you all: " /// """&my_quote""";
4 run;

Hello - I say to you all:


"Yes, The New Orleans Saints won the Super Bowl!"
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds


Scott Barry
SBBWorks, Inc.

Recommended Google advanced search argument, this topic/post:

using macro variables quoted strings site:sas.com
Yennie
Calcite | Level 5
Hey scott,

thanks heaps. amended my script to something like that and works well 🙂

%Let dir = \\int\Collaborate\PI\Portfoli\PI-Pricing\Risk & Operations\Asset Risk\PROJECTS\VOR Monthly Report Tool\HTML\;
%Let frameset = gio_frame.html;
%Let leftframe = gio_inforce_leftframe.html;
%Let righttopframe = rightf_all.html;
%Let output = results.html;

Filename gioframe "&dir&frameset";
Data _Null_;
File gioframe;
Put '';
Put "";
Put '';
Put "";
Put "";
Put '';
Put '';
Run;

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
  • 3 replies
  • 681 views
  • 0 likes
  • 2 in conversation