<?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: Filename size limitations in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197091#M49231</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kurt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your idea works!&amp;nbsp; I use the x command to call cURL and save the output directly to a text file.&amp;nbsp; This circumvents any restrictions in SAS.&amp;nbsp; I can then use proc groovy to parse the data (json file).&amp;nbsp; Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Bill&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;x "curl -d @C:\Users\Bill\Desktop\curl.txt -H ""Authorization: OAuth oauth_consumer_key=""""&amp;amp;oauth_consumer_key"""",oauth_token=""""&amp;amp;oauth_token"""",oauth_signature_method=""""&amp;amp;oauth_signature_method."""",&lt;BR /&gt;&amp;nbsp; oauth_signature=""""&amp;amp;oauth_signature."""",oauth_timestamp=""""&amp;amp;oauth_timestamp."""",oauth_nonce=""""&amp;amp;oauth_nonce."""",oauth_version=""""&amp;amp;oauth_version."""""" &lt;BR /&gt;&amp;nbsp; -k &amp;amp;url. -o C:\json.txt";&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Mar 2015 20:41:43 GMT</pubDate>
    <dc:creator>BillJones</dc:creator>
    <dc:date>2015-03-10T20:41:43Z</dc:date>
    <item>
      <title>Filename size limitations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197087#M49227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: #ffffff;"&gt;I'm calling cURL in SAS to perform POST requests. My code runs fine except the post output (json file) gets truncated when I submit larger requests. The lrecl of the post output is 1098304 even though I set both the --max-filesize option in cURL and lrecl in SAS equal to 100M.&amp;nbsp; I'm running SAS 9.3 on Windows 7 Professional.&amp;nbsp; Note I need the ability to download larger json files, so simply limiting the size of the output isn't an option.&amp;nbsp; Also, when I submit the cURL request from the Windows command line, I get the entire file, no truncation.&amp;nbsp; So this appears to be a SAS/Windows issue.&amp;nbsp; &lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: #ffffff;"&gt;Again, total record length is limited to &lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: #ffffff;"&gt;1098304.&amp;nbsp; Is there some other option that I should tweak to increase the size of the total record length?&amp;nbsp; Perhaps buffersize?&amp;nbsp; Any suggestions would be greatly appreciated.&amp;nbsp; Thanks so much.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-size: 15px; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;filename data pipe "curl -d @C:\Users\Bill\Desktop\curl.txt -H ""Authorization: OAuth oauth_consumer_key=""""&amp;amp;oauth_consumer_key"""",oauth_token=""""&amp;amp;oauth_token"""",oauth_signature_method=""""&amp;amp;oauth_signature_method."""",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&amp;nbsp; oauth_signature=""""&amp;amp;oauth_signature."""",oauth_timestamp=""""&amp;amp;oauth_timestamp."""",oauth_nonce=""""&amp;amp;oauth_nonce."""",oauth_version=""""&amp;amp;oauth_version."""""" &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&amp;nbsp; POST -k &amp;amp;url. --max-filesize 100000000" lrecl=100000000;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS log excerpt::&lt;/P&gt;&lt;P&gt;NOTE: 1 record was read from the infile DATA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The minimum record length was 1098304.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The maximum record length was 1098304.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; One or more lines were truncated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 03:58:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197087#M49227</guid>
      <dc:creator>BillJones</dc:creator>
      <dc:date>2015-03-09T03:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filename size limitations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197088#M49228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you actually read the line? (what's your input statement). And think about using the truncover option on the infile statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 06:35:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197088#M49228</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-03-09T06:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Filename size limitations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197089#M49229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kurt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your thoughts.&amp;nbsp; My input statement is below.&amp;nbsp; Currently, I'm putting the output to the log, so I can view it.&amp;nbsp; I could be wrong, but I don't believe the input statement is the issue.&amp;nbsp; It appears that the data gets truncated when I execute the filename statement.&amp;nbsp; Note I've examined the output from the filename statement and the total record length is just below 1098304, which is the limit SAS imposes even though I specify lrecl=100M.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile data truncover;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _infile_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 06:59:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197089#M49229</guid>
      <dc:creator>BillJones</dc:creator>
      <dc:date>2015-03-09T06:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Filename size limitations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197090#M49230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My next idea would be to store the curl output into a file and then try to read that with SAS. This could end up giving you a clue about further options needed. Since the whole "file" seems to be a stream without record boundaries at all, you would probably need to read it with recfm=n, which is not valid in a filename pipe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 07:13:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197090#M49230</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-03-09T07:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Filename size limitations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197091#M49231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kurt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your idea works!&amp;nbsp; I use the x command to call cURL and save the output directly to a text file.&amp;nbsp; This circumvents any restrictions in SAS.&amp;nbsp; I can then use proc groovy to parse the data (json file).&amp;nbsp; Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Bill&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;x "curl -d @C:\Users\Bill\Desktop\curl.txt -H ""Authorization: OAuth oauth_consumer_key=""""&amp;amp;oauth_consumer_key"""",oauth_token=""""&amp;amp;oauth_token"""",oauth_signature_method=""""&amp;amp;oauth_signature_method."""",&lt;BR /&gt;&amp;nbsp; oauth_signature=""""&amp;amp;oauth_signature."""",oauth_timestamp=""""&amp;amp;oauth_timestamp."""",oauth_nonce=""""&amp;amp;oauth_nonce."""",oauth_version=""""&amp;amp;oauth_version."""""" &lt;BR /&gt;&amp;nbsp; -k &amp;amp;url. -o C:\json.txt";&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 20:41:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197091#M49231</guid>
      <dc:creator>BillJones</dc:creator>
      <dc:date>2015-03-10T20:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Filename size limitations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197092#M49232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@BillJones,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are going to parse the file with PROC GROOVY, you might as well call the web service with it as well and avoid using cURL and writing the file.&amp;nbsp; You could probably also read the pipe as a stream in the data step to parse it with SAS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 20:49:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197092#M49232</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2015-03-10T20:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Filename size limitations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197093#M49233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@FriedEgg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestions.&amp;nbsp; By web service do you mean use java via proc groovy to submit a request to the api?&amp;nbsp;&amp;nbsp; Would this be faster than using cURL?&amp;nbsp; The reason I use cURL is that I can submit 3 requests simultaneously. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Bill&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 21:36:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197093#M49233</guid>
      <dc:creator>BillJones</dc:creator>
      <dc:date>2015-03-10T21:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Filename size limitations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197094#M49234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you license SAS/CONNECT then you can execute the multiple calls simultaneously, or spawn multiple instances of SAS either in batch or with systask/x statements, etc....&amp;nbsp; It also makes the process more transportable.&amp;nbsp; Far as efficiency, I couldn't necessarily say, but there are fewer I/O operations by avoid the write and read of the JSON file on disk.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 22:15:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Filename-size-limitations/m-p/197094#M49234</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2015-03-10T22:15:06Z</dc:date>
    </item>
  </channel>
</rss>

