SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 61280: The ODS HTML statement generates errors in the SAS® 9.4 TS1M5 windowing environment when the FILE= option includes a fully qualified path

DetailsAboutRate It

Error messages like the following might be generated when you use an ODS HTML statement with a FILE= option that specifies a fully qualified path with a directory and a filename:

ERROR: A component of C:\Users\userid\AppData\Local\Temp\SAS Temporary Files\_TD11200_D79945_\c:\test\test.html is not a directory.
ERROR: No body file. HTML output will not be created.

This is most likely to occur beginning in the fifth maintenance release of SAS® 9.4 (TS1M5) when you use the SAS® windowing environment. 

The problem occurs because the "Use SASWORK" option is set as the default in the SAS registry and preferences.  This causes the WORK folder to be prefixed to the path that is specified with the FILE= option.

There are three possible circumventions for this issue.  Choose one of the following:

1.  Use the best practice for generating HTML files.  Separate the path from the filename using a combination of the PATH= option to specify the directory, and the FILE= option to specify the filename.  For example:

ods html path="c:\temp" file="myfile.html";

proc print data=sashelp.class;
run;

ods html close;

2.  Select Tools ► Options ► Preferences from the SAS menu bar and select the Results tab.  Clear the Use SASWORK check box. 

3.  Modify your SAS registry to disable the "Use SASWORK" option.  This can be done interactively using the SAS Registry editor or by using PROC REGISTRY to modify this setting programmatically.

The sample code below saves the registry key settings to a temporary file with the DATA step, and then uses PROC REGISTRY to import the key settings.  The "Use SASWORK" option will not be enabled for subsequent ODS HTML statements.

filename source temp;
data _null_;
   file source;
   put '[ODS\DMS\DESTINATIONS\MARKUP\HTML4]';
   put ' "Use SASWORK" = "Off" ';
run;
/*---------------------------*/
/* Change the SAS registry   */
/*---------------------------*/
proc registry import=source;
run;
/*-------------------------------------------------*/
/* Notify an existing destination that             */
/* it needs to reprocess the preferences.          */
/*-------------------------------------------------*/
ods preferences;


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASWindows 7 Enterprise x649.4 TS1M5
Windows 7 Enterprise 32 bit9.4 TS1M5
Microsoft Windows Server 20169.4 TS1M5
Microsoft Windows Server 2012 Std9.4 TS1M5
Microsoft Windows Server 2012 R2 Std9.4 TS1M5
Microsoft Windows Server 2012 R2 Datacenter9.4 TS1M5
Microsoft Windows Server 2012 Datacenter9.4 TS1M5
Microsoft Windows Server 2008 for x649.4 TS1M5
Microsoft Windows Server 2008 R29.4 TS1M5
Microsoft Windows Server 20089.4 TS1M5
Microsoft Windows 109.4 TS1M5
Microsoft Windows 8.1 Pro x649.4 TS1M5
Microsoft Windows 8.1 Pro 32-bit9.4 TS1M5
Microsoft Windows 8.1 Enterprise x649.4 TS1M5
Microsoft Windows 8.1 Enterprise 32-bit9.4 TS1M5
Microsoft Windows 8 Pro x649.4 TS1M5
Microsoft Windows 8 Pro 32-bit9.4 TS1M5
Microsoft Windows 8 Enterprise x649.4 TS1M5
Microsoft Windows 8 Enterprise 32-bit9.4 TS1M5
Microsoft® Windows® for x649.4 TS1M5
z/OS 64-bit9.4 TS1M5
z/OS9.4 TS1M5
Windows 7 Home Premium 32 bit9.4 TS1M5
Windows 7 Home Premium x649.4 TS1M5
Windows 7 Professional 32 bit9.4 TS1M5
Windows 7 Professional x649.4 TS1M5
Windows 7 Ultimate 32 bit9.4 TS1M5
Windows 7 Ultimate x649.4 TS1M5
64-bit Enabled AIX9.4 TS1M5
64-bit Enabled Solaris9.4 TS1M5
HP-UX IPF9.4 TS1M5
Linux for x649.4 TS1M5
Solaris for x649.4 TS1M5
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.