<?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 Maximum number of lines in a Stored Process in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/290485#M5075</link>
    <description>&lt;P&gt;Hello, is there a maximum&amp;nbsp;number of lines that can be submitted as part of a SAS stored process (SP) in SAS Enterprise Guide?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am asking because I run&amp;nbsp;a SAS code containing ~&amp;nbsp;3,000 lines with no errors under&amp;nbsp;normal SAS code submission but when I run it as an SP, the&amp;nbsp;SP stops with an error pop-up window stating that no results were generated. In addition, the&amp;nbsp;generated log is truncated to a file whose size is just 50 kb (compared to 300 kb under the aforementioned regular sas submission).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I remove from the SP code ~ 2000 lines from the middle of &amp;nbsp;the code that correspond to one single PROC FORMAT statement and replace the lines with an %INCLUDE of&amp;nbsp;a separate code that defines the formats, the SP runs without any errors (now it has ~ 1,000 lines).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I run an SP that contains just the PROC FORMAT spanning 2,000 lines, the SP completes successfully.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, is there a limit&amp;nbsp;of&amp;nbsp;the number of lines that an SP can contain that lies somewhere&amp;nbsp;between 2,000 and 3,000 lines?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;System:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Windows 7 (64-bit)&lt;/P&gt;
&lt;P&gt;SAS 9.4 (64-bit)&lt;/P&gt;
&lt;P&gt;12 GB RAM&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Aug 2016 15:12:39 GMT</pubDate>
    <dc:creator>mastropi</dc:creator>
    <dc:date>2016-08-09T15:12:39Z</dc:date>
    <item>
      <title>Maximum number of lines in a Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/290485#M5075</link>
      <description>&lt;P&gt;Hello, is there a maximum&amp;nbsp;number of lines that can be submitted as part of a SAS stored process (SP) in SAS Enterprise Guide?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am asking because I run&amp;nbsp;a SAS code containing ~&amp;nbsp;3,000 lines with no errors under&amp;nbsp;normal SAS code submission but when I run it as an SP, the&amp;nbsp;SP stops with an error pop-up window stating that no results were generated. In addition, the&amp;nbsp;generated log is truncated to a file whose size is just 50 kb (compared to 300 kb under the aforementioned regular sas submission).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I remove from the SP code ~ 2000 lines from the middle of &amp;nbsp;the code that correspond to one single PROC FORMAT statement and replace the lines with an %INCLUDE of&amp;nbsp;a separate code that defines the formats, the SP runs without any errors (now it has ~ 1,000 lines).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I run an SP that contains just the PROC FORMAT spanning 2,000 lines, the SP completes successfully.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, is there a limit&amp;nbsp;of&amp;nbsp;the number of lines that an SP can contain that lies somewhere&amp;nbsp;between 2,000 and 3,000 lines?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;System:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Windows 7 (64-bit)&lt;/P&gt;
&lt;P&gt;SAS 9.4 (64-bit)&lt;/P&gt;
&lt;P&gt;12 GB RAM&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:12:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/290485#M5075</guid>
      <dc:creator>mastropi</dc:creator>
      <dc:date>2016-08-09T15:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum number of lines in a Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/290490#M5076</link>
      <description>When you run the full code and get the "no results" error, do you see any error messages in the SAS log?  At what point does it stop?</description>
      <pubDate>Tue, 09 Aug 2016 15:17:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/290490#M5076</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2016-08-09T15:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum number of lines in a Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/290492#M5077</link>
      <description>Good question. There are no errors in the truncated log file. Following are the last few lines of the log file I generate with PROC PRINTTO:&lt;BR /&gt;(note that the log is truncated in the middle of the FORMAT procedure, furthermore, in the middle of a format definition)&lt;BR /&gt;&lt;BR /&gt;1049       VALUE F61_FOR&lt;BR /&gt;1050       &lt;BR /&gt;1051       /*LOW--1 = '001- hasta -1'&lt;BR /&gt;1052       -1&amp;lt;-0 = '002- hasta 0'&lt;BR /&gt;1053       0&amp;lt;-16 = '003- hasta 16'&lt;BR /&gt;1054       16&amp;lt;-29 = '004- hasta 29'&lt;BR /&gt;1055       29&amp;lt;-30 = '005- hasta 30'&lt;BR /&gt;1056       30&amp;lt;-31 = '006- hasta 31'&lt;BR /&gt;1057       31&amp;lt;-HIGH = '007- hasta HIGH';*/&lt;BR /&gt;1058       &lt;BR /&gt;1059       LOW-0 = '001- hasta 0'&lt;BR /&gt;1060       0&amp;lt;-15 = '002- hasta 15'&lt;BR /&gt;1061       15&amp;lt;-30 = '003- hasta 30'&lt;BR /&gt;1062       30&amp;lt;-HIGH = '004- hasta HIGH';&lt;BR /&gt;NOTE: Format F61_FOR has been output.&lt;BR /&gt;1063       &lt;BR /&gt;&amp;#12;                                                                                            Sistema SAS&lt;BR /&gt;&lt;BR /&gt;1064       &lt;BR /&gt;1065       VALUE F62_FOR&lt;BR /&gt;1066       &lt;BR /&gt;1067       /*LOW--11 = '001- hasta -11'&lt;BR /&gt;1068       -11&amp;lt;--1 = '002- hasta -1'&lt;BR /&gt;1069       -1&amp;lt;-0 = '003- hasta 0'&lt;BR /&gt;1070       0&amp;lt;-11 = '004- hasta 11'&lt;BR /&gt;1071       11&amp;lt;-18 = '005- hasta 18'&lt;BR /&gt;1072       18&amp;lt;-47 = '006- hasta 47'&lt;BR /&gt;1073       47&amp;lt;-104 = '007- hasta 104'&lt;BR /&gt;1074       104&amp;lt;-194 = '008- hasta 194'&lt;BR /&gt;1075       194&amp;lt;-319 = '009- hasta 319'&lt;BR /&gt;1076       319&amp;lt;-494 = '010- hasta 494'&lt;BR /&gt;1077       494&amp;lt;-HIGH = '011- hasta HIGH';*/&lt;BR /&gt;1078       LOW-0 = '000- hasta 0'&lt;BR /&gt;1079       0&amp;lt;-15 = '001- hasta 15'&lt;BR /&gt;1080       15&amp;lt;-31 = '002- hasta 31'&lt;BR /&gt;1081       31&amp;lt;-46 = '003-&lt;BR /&gt;NOTE: Format F62_FOR has been output.&lt;BR /&gt;NOTE: FORMAT PROCEDURE used (Total process time):&lt;BR /&gt;      real time           0.07 seconds&lt;BR /&gt;      cpu time            0.01 seconds&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:22:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/290492#M5077</guid>
      <dc:creator>mastropi</dc:creator>
      <dc:date>2016-08-09T15:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum number of lines in a Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/290538#M5078</link>
      <description>&lt;P&gt;That's truly bizarre.&amp;nbsp; If you don't get answers here, I would try posting over in the Enterprise Guide forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just for curiousity/sake of testing, you might try submitting the same code in EG just as code submission not running as a stored process.&amp;nbsp; That could help separate whether it is an EG stored process issue or an EG code submission issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, if you have some other way to run the stored process (e.g. via stored process web app), you might try running it that way, to see if it happens only when a stored process is submitted via EG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I had to guess, I would guess the problem only happens when the stored process is submitted via EG.&amp;nbsp; At least that is what I would hope.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another thought would be to delete four rows from the format, and see if it always stops on the same statement, or if it is stopping at a certain row number of the code.&amp;nbsp; I suppose it's possible that there is some unseen control character which is causing SAS to think the code submission is over.&amp;nbsp; So you might try deleting just the last line, 1081 31&amp;lt;-46 = '003-, and maybe one or two lines on either side, and see if that magically makes the whole program work.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 18:33:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/290538#M5078</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2016-08-09T18:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum number of lines in a Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/291055#M5079</link>
      <description>&lt;P&gt;Hello Quentin,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your thoughts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your first suggestion is exactly what I had tried: running the process through normal code submission in SAS EG works perfectly fine, so it's definitely a Stored Process issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As per your second suggestion, unfortunately I don't think I have other ways of running a stored process other than from SAS EG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding your third suggestion, if the unseen control character were the cause of the problem, the PROC FORMAT statement (which contains 2,000 lines) would also give an error or stop when run as a Stored Process on its own... but it actually runs successfully.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel&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;</description>
      <pubDate>Thu, 11 Aug 2016 19:39:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/291055#M5079</guid>
      <dc:creator>mastropi</dc:creator>
      <dc:date>2016-08-11T19:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum number of lines in a Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/291641#M5080</link>
      <description>Having 3000 lines SAS programs sounds like maintenance nightmare. My first action would bd trying to shorten it radically. &lt;BR /&gt;An obvious one would be to store your formats in a permanent location, or athe least use CNTLIN to make it data driven.</description>
      <pubDate>Mon, 15 Aug 2016 04:21:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/291641#M5080</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-08-15T04:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum number of lines in a Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/291659#M5081</link>
      <description>&lt;P&gt;Sure, those are valid options as well. Thanks for pointing them out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our approach (as a team inside a large organization) to put as much code&amp;nbsp;as possible&amp;nbsp;inside the&amp;nbsp;Stored Process is mostly to&amp;nbsp;handle security in one place, i.e. who is allowed to change the stored process and all related input data --such as the formats-- thus&amp;nbsp;decreasing&amp;nbsp;the probability of accidental modifications.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I see that we can define read-only datasets (to be used e.g. as input to PROC FORMAT in the CNTLIN option) with the ALTER= option of the created dataset in a data step.&amp;nbsp;But this requires a password that we need&amp;nbsp;to remember or store&amp;nbsp;somewhere (as opposed to handle security requirements solely through SAS Management Console).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another option would be to store the formats in a read-only 'formats' catalog. Since I haven't found a way of setting read-only status to a catalog, at least it can be simulated using&amp;nbsp;SAS Managemenet Console to map&amp;nbsp;a dedicated library name to the location of the 'formats' catalog with option access=readonly. But still I user could separately map that location with read/write access and change the formats... unless there is a way in SAS Management Console of defining read/write access rules to a directory sitting in the SASApp server where the application is run?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any other suggestions about security handling, I would be keen to hear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 10:23:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/291659#M5081</guid>
      <dc:creator>mastropi</dc:creator>
      <dc:date>2016-08-15T10:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum number of lines in a Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/291680#M5082</link>
      <description>&lt;P&gt;If you go the PROC FORMAT CNTLIN approach you can apply metadata permissions to the dataset (assuming you register the data in the metadata), the same way as you can apply metadata permissions to a stored process.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're on 9.4 you could look into metadata-bound libraries (&lt;A href="http://support.sas.com/documentation/cdl/en/seclibag/66930/HTML/default/viewer.htm#n0tzurc8qfze0vn13z4n6j6mzz14.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/seclibag/66930/HTML/default/viewer.htm#n0tzurc8qfze0vn13z4n6j6mzz14.htm&lt;/A&gt;).&amp;nbsp; Of course you would want to control access to the data at the OS-level as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would agree that maintenance / testing / documentin would be easier if you store the format information in datasets.&amp;nbsp; That said, I would suggest asking this question over in the EG forum, or contacting SAS support.&amp;nbsp; If EG is choking on a long format, it would be good for them to know.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 13:46:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/291680#M5082</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2016-08-15T13:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum number of lines in a Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/291820#M5083</link>
      <description>As &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt; points out, meta bound libraries are an option.  That is the top notch security you can get in Base SAS data sets.&lt;BR /&gt;If that's seem to complicated you can always secure the data set files on the OS level. Then you can also secure a permanent format catalog.</description>
      <pubDate>Tue, 16 Aug 2016 06:13:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Maximum-number-of-lines-in-a-Stored-Process/m-p/291820#M5083</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-08-16T06:13:55Z</dc:date>
    </item>
  </channel>
</rss>

