<?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: DOSUBL and ERROR: 180-322 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-and-ERROR-180-322/m-p/296520#M62149</link>
    <description>&lt;P&gt;When you use DOSUB or DOSUBL, you need to have a complete standalone "step" within the code you are passing. &amp;nbsp;So you need to have a complete DATA step, PROC step, or macro statement or global statement (like OPTIONS or SYSECHO). &amp;nbsp;The "call c_Fillmem" code is a fragment that cannot be processed as its own step. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure what your goal is here as you have a step that's working when you call the function directly. &amp;nbsp;If you're trying to run this code in parallel across a bunch of data, you might look at PROC DS2 and its ability for multithreading.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Sep 2016 12:27:57 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2016-09-05T12:27:57Z</dc:date>
    <item>
      <title>DOSUBL and ERROR: 180-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-and-ERROR-180-322/m-p/295913#M61898</link>
      <description>&lt;P&gt;I am reading on DOSUBL using Rick Langston's paper on it. I wanted to get rid of Proc FCMP layer in calling a Function from Proc PROTO. I am getting the ERROR: 180-322. This means "Missing Semicolon". I have inserted semicolon in places I thought is relevant. But I don't get the results.&lt;/P&gt;&lt;P&gt;I give below the usual Proc FCMP layer first. It works. When I use DOSUB part given at the bottom of the listing, the said error comes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone tell me my mistake?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc proto packet = work.proto.fill;
   void c_Fillmem(double *v);
   externc c_Fillmem;
   
   void c_Fillmem(double *v)
   {
      int i;
      for ( i = 0; i &amp;lt; 5; i++)
         v[i] = (double) i * 10 + 100;
   }
   externcend;
quit;

proc fcmp inlib = work.proto outlib = work.fcmp.fill;
   subroutine Fillmem(v[*]);
      outargs v;
      call c_Fillmem(v);
   endsub;
quit;

options cmplib = (work.proto work.fcmp);

data _null_;
   array k[5] _temporary_;
   call Fillmem(k);
   do i = 1 to 5;
      put k[i] = ;
   end;
run;

/** Using DOSUBL() for the above **/
options cmplib = (work.proto );

data _null_;
   array k[5] _temporary_;
   rc = dosubl("call c_FillMem(k)");
   do i = 1 to 5;
      put k[i] = ;
   end;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Sep 2016 16:00:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DOSUBL-and-ERROR-180-322/m-p/295913#M61898</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2016-09-01T16:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: DOSUBL and ERROR: 180-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-and-ERROR-180-322/m-p/296428#M62107</link>
      <description>&lt;P&gt;This error is generic to SAS not recognizing what is submitted. You also get it if you submit&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  abcde;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Sorry&amp;nbsp;I can't help further as I have no idea why your code is failing, but I await an informed reply with interest. &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS﻿&lt;/a&gt;&amp;nbsp;or &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger﻿&lt;/a&gt; may be able to help ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 04:16:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DOSUBL-and-ERROR-180-322/m-p/296428#M62107</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-09-05T04:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: DOSUBL and ERROR: 180-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-and-ERROR-180-322/m-p/296520#M62149</link>
      <description>&lt;P&gt;When you use DOSUB or DOSUBL, you need to have a complete standalone "step" within the code you are passing. &amp;nbsp;So you need to have a complete DATA step, PROC step, or macro statement or global statement (like OPTIONS or SYSECHO). &amp;nbsp;The "call c_Fillmem" code is a fragment that cannot be processed as its own step. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure what your goal is here as you have a step that's working when you call the function directly. &amp;nbsp;If you're trying to run this code in parallel across a bunch of data, you might look at PROC DS2 and its ability for multithreading.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 12:27:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DOSUBL-and-ERROR-180-322/m-p/296520#M62149</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-09-05T12:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: DOSUBL and ERROR: 180-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-and-ERROR-180-322/m-p/296577#M62166</link>
      <description>&lt;P&gt;Chris:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get the array cells filled while I am waiting inside the data step.&lt;/P&gt;&lt;P&gt;PROC FCMP bridged the call happily. So I tried DOSUBL to bypass the FCMP bridge,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I placed the entire PROC within DOSUBL(). It does not work as it worked with FCMP bridge. Here is my Log. I am using SASUE(using the latest version).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 55         
 56         options cmplib = (work.proto);
 57         
 58         data _null_;
 59            array k[5] _temporary_;
 60            rc = dosubl('
 61         proc proto packet = work.proto.fill;
 62             void c_Fillmem(double *v);
 63             externc c_Fillmem;
 64         
 65             void c_Fillmem(double *v)
 66             {
 67               int i;
 68               for ( i = 0; i &amp;lt; 5; i++)
 69                  v[i] = (double) i * 10 + 100;
 70             }
 71             externcend;
 72          ');
 73         
 74            do i = 1 to 5;
 75               put k[i] = ;
 76            end;
 77         run;
 
 NOTE: Prototypes saved to WORK.PROTO.FILL.
 NOTE: PROCEDURE PROTO used (Total process time):
       real time           0.08 seconds
       cpu time            0.08 seconds
       
 
 k[1]=.
 k[2]=.
 k[3]=.
 k[4]=.
 k[5]=.
 NOTE: DATA statement used (Total process time):
       real time           0.25 seconds
       cpu time            0.24 seconds
       
 
 78         
 79         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 91         &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Sep 2016 16:37:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DOSUBL-and-ERROR-180-322/m-p/296577#M62166</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2016-09-05T16:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: DOSUBL and ERROR: 180-322</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-and-ERROR-180-322/m-p/297020#M62325</link>
      <description>&lt;P&gt;Just now I heard from Rick Langston that DOSUBL does not address my circumstance but PROC FCMP does. I will use Proc FCMP for my purpose.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 16:43:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DOSUBL-and-ERROR-180-322/m-p/297020#M62325</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2016-09-07T16:43:28Z</dc:date>
    </item>
  </channel>
</rss>

