<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ERROR: File is in use in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-File-is-in-use/m-p/32967#M4837</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the situation is now much better than earlier: when it seemed nothing flagged that the submitter didn't have rights to write in the ODS destination.&lt;/P&gt;&lt;P&gt;(once bitten, it was easy enough to model and verify write privilege in a data step, but took a while to recognise the issue &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Oct 2011 11:11:59 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2011-10-27T11:11:59Z</dc:date>
    <item>
      <title>ERROR: File is in use</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-File-is-in-use/m-p/32964#M4834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It appears that SAS sets SYSCC=1012 when the ODS file is locked by another process.&amp;nbsp; Is examination of SYSCC after ODS RTF statement as show below considered the acceptable way to trap this error.&amp;nbsp; This is the most common reason my BATCH job with ODS RTF fails is because I have the FILE= open in WORD.&amp;nbsp; I wan't to trap this error early in my program yada yada yada.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;2363&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let SYSCC=0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;2364&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put NOTE: SYSERR=&amp;amp;syserr SYSRC=&amp;amp;sysrc SYSCC=&amp;amp;syscc;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;NOTE: SYSERR=0 SYSRC=0 SYSCC=0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;2365&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;2366&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods rtf file='&amp;lt;path to file&amp;gt;';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;ERROR: File is in use, &amp;lt;path to file&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;ERROR: Fatal ODS error has occurred. Unable to continue processing this output destination.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;WARNING: No body file. RTF output will not be created.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;2367&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put NOTE: SYSERR=&amp;amp;syserr SYSRC=&amp;amp;sysrc SYSCC=&amp;amp;syscc;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;NOTE: SYSERR=0 SYSRC=0 SYSCC=1012&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2011 22:30:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-File-is-in-use/m-p/32964#M4834</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-10-21T22:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: File is in use</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-File-is-in-use/m-p/32965#M4835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;disappointing quietness on this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked - and have same result in 9.2 and 9.3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two additional macro variables (introduced in SAS9.2) offer the latest ERROR and WARNING messages&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;37&amp;nbsp;&amp;nbsp; %put NOTE: SYSERR=&amp;amp;syserr SYSRC=&amp;amp;sysrc SYSCC=&amp;amp;syscc ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #365f91; font-size: 8pt;"&gt;NOTE: SYSERR=0 SYSRC=0 SYSCC=1012&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;38&amp;nbsp;&amp;nbsp; %put NOTE: syswarningtext=&amp;amp;syswarningtext ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #365f91; font-size: 8pt;"&gt;NOTE: syswarningtext= No body file. RTF output will not be created&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;39&amp;nbsp;&amp;nbsp; %put NOTE: syserrortext=&amp;amp;syserrortext ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #365f91; font-size: 8pt;"&gt;NOTE: syserrortext= Fatal ODS error has occurred. Unable to continue processing this output destination&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first of the two ERROR messages (which named the file "in use") is lost. Although not too important in this situation, future "situations" are unknown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peter&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #365f91; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 10:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-File-is-in-use/m-p/32965#M4835</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-10-27T10:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: File is in use</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-File-is-in-use/m-p/32966#M4836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I was hoping to get confirmation from those in the know if my technique as accepted practice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a program that produces an RTF report after doing enough computing to "send a man to the moon".&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to check if the report RTF file can be written, with the assumption that if the file is available when I check it will still be available after circling the moon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think checking SYSCC as describe will suffice.&amp;nbsp; In my program I don't need SYSERRORTEXT as those errors are printed in the log.&amp;nbsp; I check SYSCC write a message to the user to "look at the log", I probably should send them an email too,&amp;nbsp; jump to "tidy up and exit with error".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 11:01:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-File-is-in-use/m-p/32966#M4836</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-10-27T11:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: File is in use</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-File-is-in-use/m-p/32967#M4837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the situation is now much better than earlier: when it seemed nothing flagged that the submitter didn't have rights to write in the ODS destination.&lt;/P&gt;&lt;P&gt;(once bitten, it was easy enough to model and verify write privilege in a data step, but took a while to recognise the issue &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 11:11:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-File-is-in-use/m-p/32967#M4837</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-10-27T11:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: File is in use</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-File-is-in-use/m-p/32968#M4838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; The real issue is that you want to create a report that overwrites the existing file. If there are many users then there is a good liklihood that one of them will leave the file open and it can't be updated.&lt;/P&gt;&lt;P&gt;A possible solution is to create a filename that includes a date tag, example rtf_report_20111031.rtf. &lt;/P&gt;&lt;P&gt;If you are stuck with using the same file name then I might suggest creating the report locally using the name with the date and then, upon completion, copying the file onto the old filename.Here is a sample code within a macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; systask command "copy ""&amp;amp;pdf_filename"" &amp;amp;pdf_copy" status=copypdf WAIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %if &amp;amp;copypdf ne 0 %then %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put ERROR: Copy of Report &amp;amp;pdf_filename not completed;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Advantage here is that if the copy fails the report already exists and can then be manually copied without the need to rerun the analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2011 09:00:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ERROR-File-is-in-use/m-p/32968#M4838</guid>
      <dc:creator>barheat</dc:creator>
      <dc:date>2011-10-31T09:00:40Z</dc:date>
    </item>
  </channel>
</rss>

