<?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: Automating SAS Package deployment using Import/Export Batch Tool in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Automating-SAS-Package-deployment-using-Import-Export-Batch-Tool/m-p/913103#M27917</link>
    <description>&lt;P&gt;Working on the same right now! So I tested the following: run the ImportPackage command trying to import some objects to a floder for which&amp;nbsp; I have no metadata permissions at all. This obviously fails. And also I get a return code 4 (warnings, it's apparently not considered an error). Please elaborate on your actions as mine do not confirm your findings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: I am on Linux, RHEL8. and SAS 9.4M8.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;- Jan.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jan 2024 11:28:04 GMT</pubDate>
    <dc:creator>jklaverstijn</dc:creator>
    <dc:date>2024-01-26T11:28:04Z</dc:date>
    <item>
      <title>Automating SAS Package deployment using Import/Export Batch Tool</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Automating-SAS-Package-deployment-using-Import-Export-Batch-Tool/m-p/913100#M27916</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm automating the package deployment of all SAS objects like jobs, flow, etc.. from one Environment to the other using the Import/Export batch tool in an Unix script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While performing the export, I do have some error and warnings.&amp;nbsp; I dont want to proceed further if there is a warning or error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I used the Returncode&amp;nbsp; in my script. But if there are any error/warning in export package , it still have the return code as Zero (Success ) .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to perform some action if there are warnings or errors. Please let me know how to action this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 11:03:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Automating-SAS-Package-deployment-using-Import-Export-Batch-Tool/m-p/913100#M27916</guid>
      <dc:creator>freshstarter</dc:creator>
      <dc:date>2024-01-26T11:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Automating SAS Package deployment using Import/Export Batch Tool</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Automating-SAS-Package-deployment-using-Import-Export-Batch-Tool/m-p/913103#M27917</link>
      <description>&lt;P&gt;Working on the same right now! So I tested the following: run the ImportPackage command trying to import some objects to a floder for which&amp;nbsp; I have no metadata permissions at all. This obviously fails. And also I get a return code 4 (warnings, it's apparently not considered an error). Please elaborate on your actions as mine do not confirm your findings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: I am on Linux, RHEL8. and SAS 9.4M8.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;- Jan.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 11:28:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Automating-SAS-Package-deployment-using-Import-Export-Batch-Tool/m-p/913103#M27917</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2024-01-26T11:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Automating SAS Package deployment using Import/Export Batch Tool</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Automating-SAS-Package-deployment-using-Import-Export-Batch-Tool/m-p/913104#M27918</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12460"&gt;@jklaverstijn&lt;/a&gt;&amp;nbsp;for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm in SAS M7 and Red Hat Linux 7.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In&amp;nbsp; a script i uses&amp;nbsp; the export command for exporting Stored Process. After execution,&amp;nbsp; at the end export logs, it says "Completed successfully with errors'. When I scan the logs, below is the error message&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reason : Connection failed because of invalid credentials&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;above error is expected. So i had the return code syntax ( after my export command )&amp;nbsp; &amp;nbsp;in my script as below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RETURN=$?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if [ $RETURN=0 ];&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;echo "Export package completed successfully"&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;echo "Export failed for some reason"&lt;/P&gt;&lt;P&gt;fi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above syntax says&amp;nbsp;"Export package completed successfully" even though my export command had errors.&lt;/P&gt;&lt;P&gt;How to resolve this ? I need "Export failed for some reason " as an output for these kind of scenarios.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 12:20:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Automating-SAS-Package-deployment-using-Import-Export-Batch-Tool/m-p/913104#M27918</guid>
      <dc:creator>freshstarter</dc:creator>
      <dc:date>2024-01-26T12:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Automating SAS Package deployment using Import/Export Batch Tool</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Automating-SAS-Package-deployment-using-Import-Export-Batch-Tool/m-p/913108#M27919</link>
      <description>&lt;P&gt;That error is certainly not because you failed to connect to the metadata server (the message would be different and the returncode would be &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; so it seems like there is some downstream resource the export is trying to connect to. A special case that may explain the rc=0 you see. Also one I may not be able to help with.&lt;/P&gt;
&lt;P&gt;I do know we have situations where the reverse is happening: ExportPackage fails but no error message in the logs. Usually when a flow is corrupted (which happens all too often). But that won't help you either. Just to confirm ImportPackage and ExportPackage are somewhat problematic.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 13:02:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Automating-SAS-Package-deployment-using-Import-Export-Batch-Tool/m-p/913108#M27919</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2024-01-26T13:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: Automating SAS Package deployment using Import/Export Batch Tool</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Automating-SAS-Package-deployment-using-Import-Export-Batch-Tool/m-p/913150#M27920</link>
      <description>&lt;P&gt;It sounds like the concern here is that the return code for the ExportPackage application may still be zero even if a warning or error is encountered.&lt;/P&gt;
&lt;P&gt;Perhaps instead of using your logic testing against $?, you test against the contents of the log file. For example:&lt;/P&gt;
&lt;P&gt;ExportPackage -profile "SASAdmin" -package /tmp/package.spk -objects "/User Folders/sasdemo" -includeDep -disableX11 -log /tmp/checkerr.log&lt;/P&gt;
&lt;P&gt;err=$(grep -cE '(WARN|ERROR|FATAL)' /tmp/checkerr.log)&lt;/P&gt;
&lt;P&gt;if [ "$err" =&amp;nbsp; '0' ]&lt;/P&gt;
&lt;P&gt;then&lt;/P&gt;
&lt;P&gt;echo "Export completed successfully."&lt;/P&gt;
&lt;P&gt;else&lt;/P&gt;
&lt;P&gt;echo "Export failed. See /tmp/checkerr.log for more details."&lt;/P&gt;
&lt;P&gt;fi&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 17:57:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Automating-SAS-Package-deployment-using-Import-Export-Batch-Tool/m-p/913150#M27920</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2024-01-26T17:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Automating SAS Package deployment using Import/Export Batch Tool</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Automating-SAS-Package-deployment-using-Import-Export-Batch-Tool/m-p/913651#M27953</link>
      <description>Thank you so much. This helps</description>
      <pubDate>Tue, 30 Jan 2024 18:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Automating-SAS-Package-deployment-using-Import-Export-Batch-Tool/m-p/913651#M27953</guid>
      <dc:creator>freshstarter</dc:creator>
      <dc:date>2024-01-30T18:54:01Z</dc:date>
    </item>
  </channel>
</rss>

