<?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: Follow Up to Answered Question That is Locked in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Follow-Up-to-Answered-Question-That-is-Locked/m-p/518574#M32642</link>
    <description>&lt;P&gt;Sure, no problem&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/24237"&gt;@elwayfan446&lt;/a&gt;.&amp;nbsp; Here is the SASEGItemType enumeration defined in SASEGScripting.dll:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;public enum SASEGItemType
{
	egLog = 0,
	egCode = 1,
	egData = 2,
	egQuery = 3,
	egContainer = 4,
	egDocBuilder = 5,
	egNote = 6,
	egResult = 7,
	egTask = 8,
	egTaskCode = 9,
	egProjectParameter = 10,
	egOutputData = 11,
	egStoredProcess = 12,
	egStoredProcessParameter = 13,
	egPublishAction = 14,
	egCube = 0xF,
	egReport = 18,
	egReportSnapshot = 19,
	egOrderedList = 20,
	egSchedule = 21,
	egLink = 22,
	egFile = 23,
	egIntrNetApp = 24,
	egInformationMap = 25,
	egProjectLog = 26
}&lt;/PRE&gt;
&lt;P&gt;And here are the types that explicitly expose a Log property:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Task&lt;BR /&gt;Query&lt;BR /&gt;StoredProcess&lt;BR /&gt;Code&lt;BR /&gt;PublishAction&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And the Log type exposes a Text property.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, your updated code might look something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    '-----
    ' export the log for each runnable item in a specific process flow
    '-----
    const SASEGItemType_egLog = 0
    const SASEGItemType_egCode = 1
    const SASEGItemType_egQuery = 3
    const SASEGItemType_egTask = 8
    const SASEGItemType_egStoredProcess = 12
    const SASEGItemType_egPublishAction = 14
    Dim item
    Set containerObject = prjObject.ContainerCollection.Item("Process Flow 2")
    For Each item in containerObject.Items
        If item.Type = SASEGItemType_egCode Or _
            item.Type = SASEGItemType_egQuery Or _
            item.Type = SASEGItemType_egTask Or _
            item.Type = SASEGItemType_egStoredProcess Or _
            item.Type = SASEGItemType_egPublishAction Then
            'MsgBox item.Log.Text
            item.Log.SaveAs "c:\temp\" &amp;amp; item.Name &amp;amp; ".log"
        ElseIf item.Type = SASEGItemType_egLog Then
            'MsgBox item.Text
            item.SaveAs "c:\temp\" &amp;amp; item.Name &amp;amp; ".log"
        End If
    Next&lt;/PRE&gt;
&lt;P&gt;Casey&lt;/P&gt;</description>
    <pubDate>Tue, 04 Dec 2018 20:47:52 GMT</pubDate>
    <dc:creator>CaseySmith</dc:creator>
    <dc:date>2018-12-04T20:47:52Z</dc:date>
    <item>
      <title>Follow Up to Answered Question That is Locked</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Follow-Up-to-Answered-Question-That-is-Locked/m-p/517105#M32610</link>
      <description>&lt;P&gt;I want to ask a follow up question to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15089"&gt;@CaseySmith&lt;/a&gt; to this thread from 2016 but it is locked.&amp;nbsp; In your solution to export logs from the VB Script, it currently exports logs from each process flow in the project.&amp;nbsp; How can I change this so it is only exporting the log from a specific containername?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/Export-SAS-log-to-external-files/td-p/287838" target="_blank"&gt;https://communities.sas.com/t5/SAS-Enterprise-Guide/Export-SAS-log-to-external-files/td-p/287838&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 15:59:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Follow-Up-to-Answered-Question-That-is-Locked/m-p/517105#M32610</guid>
      <dc:creator>elwayfan446</dc:creator>
      <dc:date>2018-11-29T15:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Follow Up to Answered Question That is Locked</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Follow-Up-to-Answered-Question-That-is-Locked/m-p/518311#M32633</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/24237"&gt;@elwayfan446&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rather than iterating the project's CodeCollection (which contains all the code nodes in the project), I would get the desired process flow (I indexed it by name in the example below), then iterate its Items collection.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    '-----
    ' export the log for each program in a specific process flow
    '-----
    const SASEGItemType_egCode = 1
    Dim item
    Set containerObject = prjObject.ContainerCollection.Item("Process Flow 2")
    For Each item in containerObject.Items
        If item.Type = SASEGItemType_egCode Then
            'MsgBox item.Log.Text
            item.Log.SaveAs "c:\temp\" &amp;amp; item.Name &amp;amp; ".log"
        End If
    Next
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since&amp;nbsp;a process flow's Items collection can contain more than just code/programs, I checked the type in the example above to only export the logs for programs.&amp;nbsp; You'll have to adjust if you want to export the log for other runnable types (ex. tasks, query builders, stored processes).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Casey&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 06:30:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Follow-Up-to-Answered-Question-That-is-Locked/m-p/518311#M32633</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2018-12-04T06:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Follow Up to Answered Question That is Locked</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Follow-Up-to-Answered-Question-That-is-Locked/m-p/518393#M32634</link>
      <description>Thanks for following up, Casey! Can you tell me which lines of code I would change to include the other runnable types? I am looking for errors anywhere in the process flow. It looks like the SASEGItemType_egCode but I am not sure what the other codes would be.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Dec 2018 14:12:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Follow-Up-to-Answered-Question-That-is-Locked/m-p/518393#M32634</guid>
      <dc:creator>elwayfan446</dc:creator>
      <dc:date>2018-12-04T14:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Follow Up to Answered Question That is Locked</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Follow-Up-to-Answered-Question-That-is-Locked/m-p/518574#M32642</link>
      <description>&lt;P&gt;Sure, no problem&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/24237"&gt;@elwayfan446&lt;/a&gt;.&amp;nbsp; Here is the SASEGItemType enumeration defined in SASEGScripting.dll:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;public enum SASEGItemType
{
	egLog = 0,
	egCode = 1,
	egData = 2,
	egQuery = 3,
	egContainer = 4,
	egDocBuilder = 5,
	egNote = 6,
	egResult = 7,
	egTask = 8,
	egTaskCode = 9,
	egProjectParameter = 10,
	egOutputData = 11,
	egStoredProcess = 12,
	egStoredProcessParameter = 13,
	egPublishAction = 14,
	egCube = 0xF,
	egReport = 18,
	egReportSnapshot = 19,
	egOrderedList = 20,
	egSchedule = 21,
	egLink = 22,
	egFile = 23,
	egIntrNetApp = 24,
	egInformationMap = 25,
	egProjectLog = 26
}&lt;/PRE&gt;
&lt;P&gt;And here are the types that explicitly expose a Log property:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Task&lt;BR /&gt;Query&lt;BR /&gt;StoredProcess&lt;BR /&gt;Code&lt;BR /&gt;PublishAction&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And the Log type exposes a Text property.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, your updated code might look something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    '-----
    ' export the log for each runnable item in a specific process flow
    '-----
    const SASEGItemType_egLog = 0
    const SASEGItemType_egCode = 1
    const SASEGItemType_egQuery = 3
    const SASEGItemType_egTask = 8
    const SASEGItemType_egStoredProcess = 12
    const SASEGItemType_egPublishAction = 14
    Dim item
    Set containerObject = prjObject.ContainerCollection.Item("Process Flow 2")
    For Each item in containerObject.Items
        If item.Type = SASEGItemType_egCode Or _
            item.Type = SASEGItemType_egQuery Or _
            item.Type = SASEGItemType_egTask Or _
            item.Type = SASEGItemType_egStoredProcess Or _
            item.Type = SASEGItemType_egPublishAction Then
            'MsgBox item.Log.Text
            item.Log.SaveAs "c:\temp\" &amp;amp; item.Name &amp;amp; ".log"
        ElseIf item.Type = SASEGItemType_egLog Then
            'MsgBox item.Text
            item.SaveAs "c:\temp\" &amp;amp; item.Name &amp;amp; ".log"
        End If
    Next&lt;/PRE&gt;
&lt;P&gt;Casey&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 20:47:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Follow-Up-to-Answered-Question-That-is-Locked/m-p/518574#M32642</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2018-12-04T20:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Follow Up to Answered Question That is Locked</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Follow-Up-to-Answered-Question-That-is-Locked/m-p/519183#M32653</link>
      <description>Casey, thanks so much for the information. As soon as I can get back on this, I will test it out and let you know. I really appreciate it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Dec 2018 15:58:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Follow-Up-to-Answered-Question-That-is-Locked/m-p/519183#M32653</guid>
      <dc:creator>elwayfan446</dc:creator>
      <dc:date>2018-12-06T15:58:39Z</dc:date>
    </item>
  </channel>
</rss>

