<?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: Javascript execution using tsystem in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212039#M9818</link>
    <description>&lt;P&gt;generally - same as You run it from command line&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example in case of windows&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;it will be&lt;/P&gt;&lt;PRE&gt;"cmd /c cscript your file.js"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in case of Mac it will be&lt;/P&gt;&lt;PRE&gt;"rhino yourfile.js"&lt;BR /&gt;or&lt;BR /&gt;"node yourfile.js"&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Apr 2017 14:31:34 GMT</pubDate>
    <dc:creator>vapukov</dc:creator>
    <dc:date>2017-04-18T14:31:34Z</dc:date>
    <item>
      <title>Javascript execution using tsystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212038#M9817</link>
      <description>&lt;P&gt;Hi all ,&lt;/P&gt;
&lt;P&gt;I have a javascript file that contains a function which returns a value. I want to call the function from any talend component, get the returned value and use it in the job .I tried the same using tsystem component but i did not know how to call the js function from the tsystem command .Please help me on this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance,&lt;/P&gt;
&lt;P&gt;Praveen M.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:54:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212038#M9817</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T09:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript execution using tsystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212039#M9818</link>
      <description>&lt;P&gt;generally - same as You run it from command line&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example in case of windows&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;it will be&lt;/P&gt;&lt;PRE&gt;"cmd /c cscript your file.js"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in case of Mac it will be&lt;/P&gt;&lt;PRE&gt;"rhino yourfile.js"&lt;BR /&gt;or&lt;BR /&gt;"node yourfile.js"&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 14:31:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212039#M9818</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2017-04-18T14:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript execution using tsystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212040#M9819</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks. Am able to run the js file using the command in tsystem as u mentioned , but my issue is to return a value from the js function to any other component or job in talend. I used "echo" statement to throw the value , it worked .But i want to get the return value from the js function into my talend job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance ,&lt;/P&gt;&lt;P&gt;Praveen M.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 04:50:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212040#M9819</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-19T04:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript execution using tsystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212041#M9820</link>
      <description>&lt;P&gt;tSystem have settings for store Standard Output and Error Output - Console and/or variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enable store to variables, and in case of standard output - check&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;((String)globalMap.get("tSystem_1_OUTPUT"))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 04:55:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212041#M9820</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2017-04-19T04:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript execution using tsystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212042#M9821</link>
      <description>&lt;P&gt;Thanks. I used ,&lt;/P&gt;&lt;PRE&gt;System.out.println((String)globalMap.get("tSystem_1_OUTPUT"))&lt;/PRE&gt;&lt;P&gt;in tjava component after writing the necessary file details in tsystem , it thrown me 'null'. Can you elaborate the method to get the value from js file a bit in detail ? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Praveen M.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 08:01:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212042#M9821</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-19T08:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript execution using tsystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212043#M9822</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;function test(){&lt;BR /&gt;var getValues = &lt;SPAN&gt;WScript.Arguments;&lt;/SPAN&gt;
return "The merged values are:"+getValues(0)+"-"+getValues(1)+".";
}
test();&lt;/PRE&gt;&lt;P&gt;This is the sample code on my JS file .&lt;/P&gt;&lt;PRE&gt;"cmd /c cscript samplefile.js \"test\" \"run\""&lt;/PRE&gt;&lt;P&gt;This is the code on my tsystem .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Praveen M.&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;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Praveen M.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 08:38:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212043#M9822</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-19T08:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript execution using tsystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212044#M9823</link>
      <description>&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2017-04-19 at 9.04.57 PM.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LuOs.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145670i836E9933860FF93A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LuOs.png" alt="0683p000009LuOs.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;this is execution of You example in windows CMD shell&lt;/P&gt; 
&lt;P&gt;Why You expect anything other than null, if Your script return null &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tSystem catch output, but Your script do not have it&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 10:28:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212044#M9823</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2017-04-19T10:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript execution using tsystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212045#M9824</link>
      <description>I have checked the option to store the tsystem output to global variable , still it throws null. If my method throws null ,what is the correct method to store the tsystem's output in a variable and how to use it in tjava or any other component ? Thanks , Praveen M.</description>
      <pubDate>Fri, 21 Apr 2017 05:54:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212045#M9824</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-21T05:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript execution using tsystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212046#M9825</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;HR /&gt;
 &lt;A href="https://community.qlik.com/s/profile/0053p000007LLsTAAW"&gt;@praveenvm&lt;/A&gt; wrote:
 &lt;BR /&gt;I have checked the option to store the tsystem output to global variable , still it throws null. If my method throws null ,what is the correct method to store the tsystem's output in a variable and how to use it in tjava or any other component ? Thanks , Praveen M.
 &lt;HR /&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You have some misunderstanding - Your function return information&amp;nbsp;into main part of Your script, but Your script do not return anything to OS console!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tSystem store into variable or on console - Standard or Error &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Outputs&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;So for store something need to have this something &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;My picture it is result run of Your script without talend - just under windows&amp;nbsp;command line ...&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;because Your script do not send to Output any information ( == print), Talend nothing to store into variable&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 08:54:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212046#M9825</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2017-04-21T08:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript execution using tsystem</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212047#M9826</link>
      <description>&lt;P&gt;Thanks ,&amp;nbsp;i understand it now.&lt;/P&gt;&lt;P&gt;So how should i write to OS Console from my .Js file ?&lt;/P&gt;&lt;P&gt;I tried using echo , it does not work. Also what should be the code on t_java component to get the value from .js file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Praveen M.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 09:00:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Javascript-execution-using-tsystem/m-p/2212047#M9826</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-28T09:00:30Z</dc:date>
    </item>
  </channel>
</rss>

