<?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: Run egp from VBS but I need to create new parameters ( Prompt has multiple possible values ) in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Run-egp-from-VBS-but-I-need-to-create-new-parameters-Prompt-has/m-p/773419#M39717</link>
    <description>&lt;P&gt;I'll have to double-check but I don't think you can Add new prompts with the automation API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, since prompts turn into macro variables, you could submit the prompt/macro assignments by adding a new Code object to the CodeCollection, set code.Text to "%let newprompt=value;" or whatever you need, and then use code.Run. to submit.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Oct 2021 15:33:07 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2021-10-11T15:33:07Z</dc:date>
    <item>
      <title>Run egp from VBS but I need to create new parameters ( Prompt has multiple possible values )</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Run-egp-from-VBS-but-I-need-to-create-new-parameters-Prompt-has/m-p/773400#M39716</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Final users have eg 7.1.&lt;/P&gt;&lt;P&gt;I know that when a prompt with multiple values is selected sas creates:&lt;/P&gt;&lt;P&gt;%let prompt = a;&lt;/P&gt;&lt;P&gt;%let prompt0=2;&lt;/P&gt;&lt;P&gt;%let prompt1=a;&lt;/P&gt;&lt;P&gt;%let prompt2=b;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before setting the prompt values via VBS i need to add several parameters:&lt;/P&gt;&lt;P&gt;ValuePromp(0) = "a b c d e"&lt;/P&gt;&lt;P&gt;Set appSAS = CreateObject("SASEGObjectModel.Application.7.1")&lt;/P&gt;&lt;P&gt;Set prjObject = appSAS.Open(FullProgSAS,"")&lt;/P&gt;&lt;P&gt;Set ParmList = prjObject.Parameters&lt;/P&gt;&lt;P&gt;NumPar=ParmList.count&lt;/P&gt;&lt;P&gt;oFullNomeLog.write "Print NumPar " &amp;amp; NumPar &amp;amp; vbcrlf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ‘Print NumPar 7&lt;/P&gt;&lt;P&gt;NumCli_ = len(ValuePromp(0)) - len(replace(ValuePromp(0)," ",""))&lt;/P&gt;&lt;P&gt;NumCli = NumCli_ + 1&lt;/P&gt;&lt;P&gt;Dim Clients&lt;/P&gt;&lt;P&gt;Clients = Split(ValuePromp(0))&lt;/P&gt;&lt;P&gt;For i=0 to NumCli_&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; oFullNomeLog.write "Print Value: " &amp;amp; Clients(i) &amp;amp; vbcrlf&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ‘Print Value: a&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; oFullNomeLog.write "Print Par Name: prompt" &amp;amp; (i + 1) &amp;amp; vbcrlf&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;‘Print Par Name: prompt1&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; '' ParmList.Add Clients(i) ,"prompt" &amp;amp; (i + 1)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'doesn't work&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I can't manage to create those.&lt;/P&gt;&lt;P&gt;I'm missing something.&lt;/P&gt;&lt;P&gt;Do you have any idea?&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 13:00:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Run-egp-from-VBS-but-I-need-to-create-new-parameters-Prompt-has/m-p/773400#M39716</guid>
      <dc:creator>eugeniothierry</dc:creator>
      <dc:date>2021-10-11T13:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Run egp from VBS but I need to create new parameters ( Prompt has multiple possible values )</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Run-egp-from-VBS-but-I-need-to-create-new-parameters-Prompt-has/m-p/773419#M39717</link>
      <description>&lt;P&gt;I'll have to double-check but I don't think you can Add new prompts with the automation API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, since prompts turn into macro variables, you could submit the prompt/macro assignments by adding a new Code object to the CodeCollection, set code.Text to "%let newprompt=value;" or whatever you need, and then use code.Run. to submit.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 15:33:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Run-egp-from-VBS-but-I-need-to-create-new-parameters-Prompt-has/m-p/773419#M39717</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2021-10-11T15:33:07Z</dc:date>
    </item>
  </channel>
</rss>

