<?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: Import a flat file of long string of BLS data into SAS in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190764#M48072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is json, does this help? &lt;A href="http://support.sas.com/resources/papers/proceedings13/296-2013.pdf" title="http://support.sas.com/resources/papers/proceedings13/296-2013.pdf"&gt;http://support.sas.com/resources/papers/proceedings13/296-2013.pdf&lt;/A&gt;&amp;nbsp; (there are more of those)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Using the @variable to go to a position and seeing the "data" as table separator the record elsewhere are some thoughts. input statement: &lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm#n0oaql83drile0n141pdacojq97s.htm" title="http://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm#n0oaql83drile0n141pdacojq97s.htm"&gt;SAS(R) 9.3 Statements: Reference&lt;/A&gt;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jul 2014 08:32:39 GMT</pubDate>
    <dc:creator>jakarman</dc:creator>
    <dc:date>2014-07-23T08:32:39Z</dc:date>
    <item>
      <title>Import a flat file of long string of BLS data into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190763#M48071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a flat file consisting of&amp;nbsp; Series ID, Data, Year, Period, Period Name and Value. It is of the form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[{"seriesID":"CES1000000001","data":[{"year":"2014","period":"M06","periodName":"June","value":"907","footnotes":[{"code":"P","text":"preliminary"}]},{"year":"2014","period":"M05","periodName":"May","value":"903","footnotes":[{"code":"P","text":"preliminary"}]},{"year":"2014","period":"M04","periodName":"April","value":"901","footnotes":[{}]},&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so forth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This file contains 6 possible variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to read this file into a data set, such that each variable&amp;nbsp; gets its own entry (ideally without the quotation mark or other delimters). Please help as I seem unable to properly read it into sas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 06:54:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190763#M48071</guid>
      <dc:creator>Msilverio</dc:creator>
      <dc:date>2014-07-23T06:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Import a flat file of long string of BLS data into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190764#M48072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is json, does this help? &lt;A href="http://support.sas.com/resources/papers/proceedings13/296-2013.pdf" title="http://support.sas.com/resources/papers/proceedings13/296-2013.pdf"&gt;http://support.sas.com/resources/papers/proceedings13/296-2013.pdf&lt;/A&gt;&amp;nbsp; (there are more of those)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Using the @variable to go to a position and seeing the "data" as table separator the record elsewhere are some thoughts. input statement: &lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm#n0oaql83drile0n141pdacojq97s.htm" title="http://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm#n0oaql83drile0n141pdacojq97s.htm"&gt;SAS(R) 9.3 Statements: Reference&lt;/A&gt;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 08:32:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190764#M48072</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-07-23T08:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Import a flat file of long string of BLS data into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190765#M48073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know that this may look more ugly than necessary, but it follows "if in doubt, use brute force":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (keep=seriesID year period periodName value code text);&lt;/P&gt;&lt;P&gt;infile '$HOME/sascommunity/SeriesDataOut.txt' lrecl=4096 truncover;&lt;/P&gt;&lt;P&gt;length&lt;/P&gt;&lt;P&gt;&amp;nbsp; data_line $ 4096&lt;/P&gt;&lt;P&gt;&amp;nbsp; seriesID $ 20&lt;/P&gt;&lt;P&gt;&amp;nbsp; year 4&lt;/P&gt;&lt;P&gt;&amp;nbsp; period $ 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; periodName $ 20&lt;/P&gt;&lt;P&gt;&amp;nbsp; value 8&lt;/P&gt;&lt;P&gt;&amp;nbsp; code $ 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; text $ 30&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;input;&lt;/P&gt;&lt;P&gt;data_line = _infile_;&lt;/P&gt;&lt;P&gt;if substr(data_line,1,12) = '[{"seriesID"';&lt;/P&gt;&lt;P&gt;data_line = substr(data_line,15);&lt;/P&gt;&lt;P&gt;i = indexc(data_line,'"');&lt;/P&gt;&lt;P&gt;seriesID = substr(data_line,1,i-1);&lt;/P&gt;&lt;P&gt;i = index(data_line,'":[');&lt;/P&gt;&lt;P&gt;data_line = substr(data_line,i+4); * removes first { from remaining string;&lt;/P&gt;&lt;P&gt;i = index(data_line,'},{');&lt;/P&gt;&lt;P&gt;do while (i ne 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; sub_line = substr(data_line,1,i-1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; data_line = substr(data_line,i+3);&lt;/P&gt;&lt;P&gt;&amp;nbsp; %macro process_subline;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = index(sub_line,'year":"');&lt;/P&gt;&lt;P&gt;&amp;nbsp; year = input(substr(sub_line,i+7,4),4.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = index(sub_line,'period":"');&lt;/P&gt;&lt;P&gt;&amp;nbsp; period = substr(sub_line,i+9,3);&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = index(sub_line,'periodName":"');&lt;/P&gt;&lt;P&gt;&amp;nbsp; sub_line = substr(sub_line,i+13);&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = indexc(sub_line,'"');&lt;/P&gt;&lt;P&gt;&amp;nbsp; periodName = substr(sub_line,1,i-1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = index(sub_line,'value":"');&lt;/P&gt;&lt;P&gt;&amp;nbsp; sub_line = substr(sub_line,i+8);&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = indexc(sub_line,'"');&lt;/P&gt;&lt;P&gt;&amp;nbsp; value = input(substr(sub_line,1,i-1),best5.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = index(sub_line,'footnotes":[{');&lt;/P&gt;&lt;P&gt;&amp;nbsp; sub_line = substr(sub_line,i+13,length(sub_line)-i-14);&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = index(sub_line,'code":"');&lt;/P&gt;&lt;P&gt;&amp;nbsp; sub_line = substr(sub_line,i+7);&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = indexc(sub_line,'"');&lt;/P&gt;&lt;P&gt;&amp;nbsp; code = substr(sub_line,1,i-1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = index(sub_line,'text":"');&lt;/P&gt;&lt;P&gt;&amp;nbsp; sub_line = substr(sub_line,i+7);&lt;/P&gt;&lt;P&gt;&amp;nbsp; text = substr(sub_line,1,length(sub_line)-1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %mend;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %process_subline;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = index(data_line,'},{');&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;sub_line = data_line;&lt;/P&gt;&lt;P&gt;%process_subline;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 10:27:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190765#M48073</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-07-23T10:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Import a flat file of long string of BLS data into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190766#M48074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should check proc groove .&lt;/P&gt;&lt;P&gt;See the last part of this paper.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://blogs.sas.com/content/sascom/2013/12/12/how-to-import-twitter-tweets-in-sas-data-step-using-oauth-2-authentication-style/" title="http://blogs.sas.com/content/sascom/2013/12/12/how-to-import-twitter-tweets-in-sas-data-step-using-oauth-2-authentication-style/"&gt;http://blogs.sas.com/content/sascom/2013/12/12/how-to-import-twitter-tweets-in-sas-data-step-using-oauth-2-authentication-style/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 13:04:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190766#M48074</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-07-23T13:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Import a flat file of long string of BLS data into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190767#M48075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is a nice one Xia. &lt;BR /&gt;Does remember proc groovy is requiring the XCMD being open and the mentioned classpath's must be installed somewhere.&lt;/P&gt;&lt;P&gt;Two questions not being touched in an open local situation. In a server-based approach this might be different.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 13:40:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190767#M48075</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-07-23T13:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Import a flat file of long string of BLS data into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190768#M48076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for Kurt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to work great when pulling a single data series ID. Unfortunately, I'm required to pull at least 25 Series ID from BLS on a single run.&amp;nbsp; Would you guys know of a more efficient way to extract this data and successfully read it into SAS with multiple SeriesID's (up to 25)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the following code to extract data from BLS:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN&gt; url=&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://api.bls.gov/publicAPI/v1/timeseries/data/;"&gt;http://api.bls.gov/publicAPI/v1/timeseries/data/;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;filename in&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"C:\SAS BLS\SeriesIn.txt"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;filename out &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"C:\SAS BLS\SeriesDataOut.txt"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;recfm=v &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;lrecl&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;32000&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;proc&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;http&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; in=in out=out url=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"&amp;amp;url"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; method=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"post"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; ct=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"application/json"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;_______________________________________________________________________________________________________&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample SeriesIn.txt&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( A text file that indicates the Seriesid's to be extracted)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; {"seriesid":["CEU0800000003","CFU0000008000","LEU0254555900","APU0000701111"],&lt;/P&gt;&lt;P&gt;"startyear":"2002",&lt;/P&gt;&lt;P&gt;"endyear":"2012"}&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 16:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190768#M48076</guid>
      <dc:creator>Msilverio</dc:creator>
      <dc:date>2014-07-23T16:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Import a flat file of long string of BLS data into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190769#M48077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using this to parse your downloaded file.&amp;nbsp; You might need to add a LRECL if the series are longer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; parse;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;infile&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; out &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;dlm&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;',:'&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;dsd&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;truncover&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;length&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; series $&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;20&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; name $&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;32&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; value $&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;200&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; series @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; _n_= series=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; series = compress(series,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'[{"}]'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; series=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'seriesID'&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp; n+&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp; row=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;* Read name of the series and throw away the "data" constant string that follows it;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; series name @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp; series = compress(series,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'[{"}]'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: blue; background-color: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: black; background-color: white;"&gt; col=&lt;/SPAN&gt;&lt;STRONG style="line-height: 1.5em; color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: blue; background-color: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;STRONG style="line-height: 1.5em; color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: blue; background-color: white;"&gt;until&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: black; background-color: white;"&gt; (name = &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: purple; background-color: white;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: black; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; name value @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; name = compress(name,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'[{"}]'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value = compress(value,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'[{"}]'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row + (name=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'year'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: blue; background-color: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: black; background-color: white;"&gt; name ne &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: purple; background-color: white;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: blue; background-color: white;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: blue; background-color: white;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: black; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;transpose&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=parse &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=want (drop=_name_) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; n series row ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; value;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;id&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; name ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;print&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 17:48:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190769#M48077</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-07-23T17:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Import a flat file of long string of BLS data into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190770#M48078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well you posted at least now that it is a JSON request and you are using a (most) probably local installed SAS foundation.&lt;/P&gt;&lt;P&gt;In that case processing JSON files is the most appropriate way to go. Xia posted a blog how to do that.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 18:06:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190770#M48078</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-07-23T18:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Import a flat file of long string of BLS data into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190771#M48079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wrote that code under the assumption that every seriesID would have its own line. If more than one come in one line, then my method needs to be adapted to that.&lt;/P&gt;&lt;P&gt;You could do a first step that slices the line into the parts that represent single seriesID's and the apply my code to the result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 07:16:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-a-flat-file-of-long-string-of-BLS-data-into-SAS/m-p/190771#M48079</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-07-24T07:16:04Z</dc:date>
    </item>
  </channel>
</rss>

