<?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: Open dataset return code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-return-code/m-p/4411731#M1048281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the specified file is not found the return code will be 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However to rectify the eroor message try like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET ws_unix_dir_and_filename FOR INPUT  &lt;/P&gt;&lt;P&gt;                        &lt;STRONG&gt;IN TEXT MODE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                  &lt;STRONG&gt;ENCODING DEFAULT&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;CLOSE DATASET ws_unix_dir_and_filename.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rama.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Sep 2008 11:28:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-04T11:28:20Z</dc:date>
    <item>
      <title>Open dataset return code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-return-code/m-p/4411730#M1048280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;am reading data from the unix directory using open data set stmt.&lt;/P&gt;&lt;P&gt;sample code :&lt;/P&gt;&lt;P&gt;    OPEN DATASET ws_unix_dir_and_filename FOR INPUT IN LEGACY TEXT MODE.&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      CLOSE DATASET ws_unix_dir_and_filename.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WITH 'File: ' ws_unix_dir_and_filename ' not found!'&lt;/P&gt;&lt;P&gt;      RAISING inv_input_parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above code was excuted in background mode , so job failed with retun code 2, this is happening some times only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my question is when the above code failes with retun code 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;DSK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2008 11:19:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-return-code/m-p/4411730#M1048280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-04T11:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Open dataset return code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-return-code/m-p/4411731#M1048281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the specified file is not found the return code will be 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However to rectify the eroor message try like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET ws_unix_dir_and_filename FOR INPUT  &lt;/P&gt;&lt;P&gt;                        &lt;STRONG&gt;IN TEXT MODE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                  &lt;STRONG&gt;ENCODING DEFAULT&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;CLOSE DATASET ws_unix_dir_and_filename.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rama.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2008 11:28:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-return-code/m-p/4411731#M1048281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-04T11:28:20Z</dc:date>
    </item>
  </channel>
</rss>

