<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Script size limitations, and calling a script from another script.]]></title><description><![CDATA[<p dir="auto">Hi All,</p>
<p dir="auto">I am trying to display a message in response to a SNMP trap that has 200+ Emums (using a case statement in a script), and there seems to be a limitation to the numbers of lines that a script allows. It allows me to add all the lines in the script editor, but when I save the script, it seems to get cut short.</p>
<p dir="auto">In an attempt to get around this I thought that I may be able to split it up into 2 separate scripts, and call them from another script. I have done some basic testing, I cannot seem to be able to call a script from another script.</p>
<p dir="auto">Can someone please advise if it is possible to call a script from another script, and if so, the syntax.</p>
<p dir="auto">Also is there some way the database can be modified to allow longer scripts?</p>
<p dir="auto">Many thanks.</p>
]]></description><link>https://forum.netxms.org/topic/865/script-size-limitations-and-calling-a-script-from-another-script.</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:26:30 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/865.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 08 Mar 2010 00:23:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Script size limitations, and calling a script from another script. on Mon, 08 Mar 2010 22:25:40 GMT]]></title><description><![CDATA[<p dir="auto">Thanks Victor,</p>
<p dir="auto">That worked. Your help is much appreciated.</p>
<p dir="auto">Kind Regards,<br />
Steve...</p>
]]></description><link>https://forum.netxms.org/post/4040</link><guid isPermaLink="true">https://forum.netxms.org/post/4040</guid><dc:creator><![CDATA[SteveK]]></dc:creator><pubDate>Mon, 08 Mar 2010 22:25:40 GMT</pubDate></item><item><title><![CDATA[Reply to Script size limitations, and calling a script from another script. on Mon, 08 Mar 2010 11:12:23 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Yes, you can call library script from another library script in a same way.</p>
<p dir="auto">I'll check script saving in MS SQL a bit later.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/4036</link><guid isPermaLink="true">https://forum.netxms.org/post/4036</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 08 Mar 2010 11:12:23 GMT</pubDate></item><item><title><![CDATA[Reply to Script size limitations, and calling a script from another script. on Mon, 08 Mar 2010 10:30:22 GMT]]></title><description><![CDATA[<p dir="auto">Hi Victor,</p>
<p dir="auto">Thank you for your swift response. I am using SQL 2005, and the field "script_code" is data type "text".</p>
<p dir="auto">The script had 5547 characters, and when saved, it chopped off after 3591 characters.</p>
<p dir="auto">In your example, you mention the calling script in event processing policy. Can this be another script in library?</p>
<p dir="auto">Kind Regards,<br />
Steve...</p>
]]></description><link>https://forum.netxms.org/post/4034</link><guid isPermaLink="true">https://forum.netxms.org/post/4034</guid><dc:creator><![CDATA[SteveK]]></dc:creator><pubDate>Mon, 08 Mar 2010 10:30:22 GMT</pubDate></item><item><title><![CDATA[Reply to Script size limitations, and calling a script from another script. on Mon, 08 Mar 2010 09:13:55 GMT]]></title><description><![CDATA[<p dir="auto">Hello!</p>
<p dir="auto">It's very strange - there are no size limitation on scripts. What database you are using?</p>
<p dir="auto">To call one script from another, called script must be in script library, and contain function(s) other than main(). Then in calling script you should add use statement, for example:</p>
<p dir="auto">script in library, called my_script:</p>
<pre><code>sub my_function()
{
   return "some value";
}
</code></pre>
<p dir="auto">script in event processing policy:</p>
<pre><code>use my_script;

sub main()
{
   value = my_function();
   // some further processing
}
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/4033</link><guid isPermaLink="true">https://forum.netxms.org/post/4033</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 08 Mar 2010 09:13:55 GMT</pubDate></item></channel></rss>