<?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>Question Re: wait function in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/wait-function/qaa-p/11180889#M4127601</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$GV_FILE_NAME_ONLY = word_ext(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$GV_FILE_NAME,-1,'/');&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jul 2015 14:49:41 GMT</pubDate>
    <dc:creator>former_member187605</dc:creator>
    <dc:date>2015-07-27T14:49:41Z</dc:date>
    <item>
      <title>wait function</title>
      <link>https://community.sap.com/t5/technology-q-a/wait-function/qaq-p/11180886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide me inputs, Here is my scenario.&lt;/P&gt;&lt;P&gt;I came up with&amp;nbsp; wait_for_file( $GV_FILE_PATH || '/' || $GV_FILE_TYPE || '*' || '.TXT',0,0,1,$GV_FILE_NAME);&amp;nbsp; to check the path and find the file to process. Finally assign it to $GV_FILE_NAME in one of the pre-processing script.&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the &lt;SPAN style="font-size: 13.3333330154419px;"&gt;$GV_FILE_NAME is capturing the complete path where I don't it because I am assigning this value to source Flat file's file name(s).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Note : &lt;SPAN style="font-size: 13.3333330154419px;"&gt;$GV_FILE_PATH&amp;nbsp; is defined as global variable with path as value.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;If run the job ,it will throw error because path is already defined and wait_for_file function is pulling the complete path.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Cannot open file &amp;lt;/test/Ecommerce/IBMMainFrame/Acknowledge_Files&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;/test/Ecommerce/IBMMainFrame/Acknowledge_Files&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;/POV_Confirm_1.TXT&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;All I need is pull just the file name from the wait_for_file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Please advice.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/733628" width="450" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 21:33:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/wait-function/qaq-p/11180886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-25T21:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: wait function</title>
      <link>https://community.sap.com/t5/technology-q-a/wait-function/qaa-p/11180887#M4127599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Heres a custom function to do it.&amp;nbsp; (I use the word count function all over the place)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;custom function:&lt;/P&gt;&lt;P&gt;$ret_fn = word_ext($InputFilePath,JB_WordCount($InputFilePath,'/'),'/');&lt;/P&gt;&lt;P&gt;Return($ret_fn);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;word count function:&lt;/P&gt;&lt;P&gt;$SubstrIdx = 0;&lt;/P&gt;&lt;P&gt;begin&lt;/P&gt;&lt;P&gt;&amp;nbsp; while(word_ext($StringInput,$SubstrIdx + 1,$Delimiter) &amp;lt;&amp;gt; '')&lt;/P&gt;&lt;P&gt;&amp;nbsp; begin&lt;/P&gt;&lt;P&gt;&amp;nbsp; $SubstrIdx = $SubstrIdx + 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end&lt;/P&gt;&lt;P&gt;end&lt;/P&gt;&lt;P&gt;return($SubstrIdx);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 13:50:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/wait-function/qaa-p/11180887#M4127599</guid>
      <dc:creator>former_member106536</dc:creator>
      <dc:date>2015-06-26T13:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: wait function</title>
      <link>https://community.sap.com/t5/technology-q-a/wait-function/qaa-p/11180888#M4127600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain with an example ??&lt;/P&gt;&lt;P&gt;I didn't understand in this area &lt;SPAN style="color: #333333; font-size: 12px;"&gt;$ret_fn = word_ext($InputFilePath,&lt;STRONG&gt;JB_WordCount&lt;/STRONG&gt;($InputFilePath,'/'),'/');&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 13:53:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/wait-function/qaa-p/11180888#M4127600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-27T13:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: wait function</title>
      <link>https://community.sap.com/t5/technology-q-a/wait-function/qaa-p/11180889#M4127601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$GV_FILE_NAME_ONLY = word_ext(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$GV_FILE_NAME,-1,'/');&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 14:49:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/wait-function/qaa-p/11180889#M4127601</guid>
      <dc:creator>former_member187605</dc:creator>
      <dc:date>2015-07-27T14:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: wait function</title>
      <link>https://community.sap.com/t5/technology-q-a/wait-function/qaa-p/11180890#M4127602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Luckily most the places I use this are for index counts not for the specific word, but I know I have a bunch of compression code that's going to get looked at now.&amp;nbsp; &lt;SPAN __jive_emoticon_name="cry" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/1322/images/emoticons/cry.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for that Dirk!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like this was an addition? as the reference manual describes the index as being non-negative, yet provides examples of negative usage.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 15:43:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/wait-function/qaa-p/11180890#M4127602</guid>
      <dc:creator>former_member106536</dc:creator>
      <dc:date>2015-07-27T15:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: wait function</title>
      <link>https://community.sap.com/t5/technology-q-a/wait-function/qaa-p/11180891#M4127603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right. Negative numbers are explicitly excluded in the word_ext definition, but one of the examples states "A negative word number means count from right to left."&lt;/P&gt;&lt;P&gt;I knew I had seen it somewhere before, couldn't remember where though &lt;SPAN __jive_emoticon_name="silly" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/1322/images/emoticons/silly.gif"&gt;&lt;/SPAN&gt;. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 19:38:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/wait-function/qaa-p/11180891#M4127603</guid>
      <dc:creator>former_member187605</dc:creator>
      <dc:date>2015-07-27T19:38:09Z</dc:date>
    </item>
  </channel>
</rss>

