/* * Change the PATH macro variable to an appropriate temp directory */ %global path; /*%let path = \\nas101\etba$\Malcolm\temp\;*/ filename fOut "&path.test.html"; /* * Write HTML document */ data _null_; file fOut; set work.y_grid(in=inYGrid1) work.y_grid(in=inYGrid2) work.points(in=inPts) work.points2(in=inPts2) work.points3(in=inPts3) end=bEnd; attrib strOut length=$1024 label='Output string'; if (_N_ = 1) then do; /* * Header */ put ''; put ''; put ''; put ''; put ''; put ''; /* * Shaded background */ put ''; put ''; put ''; put ''; put ''; put ''; put ''; /* * x- and y-axes */ put ''; put ''; /* * Group definition of axis interval labels */ put ''; put 'Pool Price ($/MWh)'; put 'Physical Position (MWh)'; /* * x-axis interval labels */ do i = -1000 to 1000 by 100; strOut = cat('', putn(i, '5.'), ''); link Output; end; end; if (inYGrid1 and (id=1)) then do; end; /* * y-axis interval labels */ if (inYGrid1) then do; strOut = cat('', putn(1e3 - y, 'dollar5.'), ''); link Output; end; if (inYGrid2 and (id=1)) then do; put ''; /* * Group definition for isoprofit lines */ put ''; end; /* * Y-axis gridlines */ if (inYGrid2) then do; strOut = cat(''); link Output; end; if (inPts and (id=1)) then do; /* * Group definition for data points */ put ''; put ''; /* * Define pulsing data point */ put ''; put ''; put ''; end; /* * Define static data points */ if (inPts) then do; strOut = cat(''); link Output; end; /* * SVG footer */ if (inPts2 and (id = 1)) then do; put ''; /* * Point description text */ put ''; put 'Select a point for more information'; put ''; /* * End SVG; Begin table definition */ put ''; put ''; /* * Table column headings */ put ''; put ''; put ''; put ''; put ''; put ''; end; /* * Table rows */ if (inPts2) then do; strOut = cat( '', byte(13), '', byte(13), '', byte(13), '', byte(13), '', byte(13), ''); link Output; end; /* * Table summary row */ if (inPts3 and (id = 1)) then do; strOut = cat( '', byte(13), '', byte(13), '', byte(13), '', byte(13), '', byte(13), ''); link Output; end; /* * Document footer */ if (bEnd) then do; put '
Hour EndingPosition (MWh)Price ($/MWh)Value ($)
', strip(putn(he, '2.')), '', strip(putn(x, 'comma12.')), '', strip(putn(y, 'dollar12.2')), '', strip(putn(z, 'dollar12.')), '
', 'Total', '', strip(putn(x, 'comma12.')), '', strip(putn(y, 'dollar12.2')), '', strip(putn(z, 'dollar12.')), '
'; put ''; put ''; end; goto Finally; Output: strOut = strip(strOut); put strOut; Finally: run;