<?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: How to use %syscall scan? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-syscall-scan/m-p/634073#M188169</link>
    <description>Severl days ago I was going to design a function findi() to find the ith position of a char or a string in a charater string. It seemed I went the wrong way and sadly I forgot the flash of thoughts. Thank you for you kind.</description>
    <pubDate>Mon, 23 Mar 2020 11:57:05 GMT</pubDate>
    <dc:creator>whymath</dc:creator>
    <dc:date>2020-03-23T11:57:05Z</dc:date>
    <item>
      <title>How to use %syscall scan?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-syscall-scan/m-p/632558#M187551</link>
      <description>&lt;P&gt;Hi, everyone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you mind share me an usage example of&amp;nbsp;%syscall scan() ? Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 03:01:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-syscall-scan/m-p/632558#M187551</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2020-03-17T03:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use %syscall scan?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-syscall-scan/m-p/632566#M187555</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270406"&gt;@whymath&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, everyone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you mind share me an usage example of&amp;nbsp;%syscall scan() ? Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;%syscall() is for using call routines on macro level, %sysfunc() for using functions on macro level.&lt;/P&gt;
&lt;P&gt;scan() is a SAS function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But...using %sysfunc() for the scan() function is not necessary as you've also got macro function %scan() for this.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let string=abc def ghi;
%put test1: %sysfunc(scan(&amp;amp;string,2));
%put test2: %scan(&amp;amp;string,2);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;28         %let string=abc def ghi;
29         %put test1: %sysfunc(scan(&amp;amp;string,2));
test1: def
30         %put test2: %scan(&amp;amp;string,2);
test2: def&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 03:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-syscall-scan/m-p/632566#M187555</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-03-17T03:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use %syscall scan?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-syscall-scan/m-p/632574#M187558</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270406"&gt;@whymath&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, everyone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you mind share me an usage example of&amp;nbsp;%syscall scan() ? Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I rarely use call scan() it all, so i don't have an example at hand. Do you mind explaining the task you are working on (including some data), so that we can try to provide an example? Will functions/call-routines in the macro-world: don't use any kind of quotes.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 05:30:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-syscall-scan/m-p/632574#M187558</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-03-17T05:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use %syscall scan?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-syscall-scan/m-p/632576#M187560</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270406"&gt;@whymath&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, everyone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you mind share me an usage example of&amp;nbsp;%syscall scan() ? Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Oh, there is actually a call scan() routine. Never used it ever.&lt;/P&gt;
&lt;P&gt;After some try and error below appears to work.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let string=abc def ghi;
%let cnt=2;
%let pos=0;
%let len=0;
%syscall SCAN(string, cnt, pos, len );
%put &amp;amp;=cnt &amp;amp;=pos &amp;amp;=len;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;CNT=2 POS=5 LEN=3&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 05:47:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-syscall-scan/m-p/632576#M187560</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-03-17T05:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to use %syscall scan?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-syscall-scan/m-p/634073#M188169</link>
      <description>Severl days ago I was going to design a function findi() to find the ith position of a char or a string in a charater string. It seemed I went the wrong way and sadly I forgot the flash of thoughts. Thank you for you kind.</description>
      <pubDate>Mon, 23 Mar 2020 11:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-syscall-scan/m-p/634073#M188169</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2020-03-23T11:57:05Z</dc:date>
    </item>
  </channel>
</rss>

