<?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 PRXPOSN Capture Buffer Start Value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879980#M347645</link>
    <description>&lt;PRE&gt;A call to PRXPOSN in the code snippet below gives me the capture buffer's &lt;BR /&gt;START value (where regex begins matching) of 30 and the END value (which &lt;BR /&gt;represents the length of matching string) value of 4 (output below).&lt;BR /&gt;&lt;BR /&gt;However, when I count the number of characters from left &lt;BR /&gt;to right in the output (html_line string), I find the START value to be 22. &lt;BR /&gt;&lt;BR /&gt;Question 1: Why do these two numbers not match?&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;filename source temp;
proc http
     url = "https://meps.ahrq.gov/data_stats/download_data_files.jsp"
     out=source;
run;

data year_values;
  	length year $4;
	infile source length = reclen lrecl = 32767 end=eof;
	re = prxparse('/&amp;lt;option value="\d{4}"&amp;gt;(\d{4})&amp;lt;\/option&amp;gt;/');
  	/* Read the HTML line by line */
	do while (not eof);
		input html_line $varying32767. reclen;
         Len_html_line = length(html_line);
         /* Match and extract the years using regular expressions */
	    if prxmatch(re, html_line) &amp;gt; 0 then do;
       		call prxposn(re, 1, start, end);
      		year = substr(html_line, start, end);
	      	output year_values;
	    end;
	end;
run;
proc print data=year_values noobs;
var Len_html_line html_line start end year;
run;
&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="3"&gt;The Output:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="3"&gt;Len_&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;html_&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;line html_line start end year&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2021"&amp;gt;2021&amp;lt;/option&amp;gt; 30 4 2021&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2020"&amp;gt;2020&amp;lt;/option&amp;gt; 30 4 2020&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2019"&amp;gt;2019&amp;lt;/option&amp;gt; 30 4 2019&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2018"&amp;gt;2018&amp;lt;/option&amp;gt; 30 4 2018&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2017"&amp;gt;2017&amp;lt;/option&amp;gt; 30 4 2017&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2016"&amp;gt;2016&amp;lt;/option&amp;gt; 30 4 2016&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2015"&amp;gt;2015&amp;lt;/option&amp;gt; 30 4 2015&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2014"&amp;gt;2014&amp;lt;/option&amp;gt; 30 4 2014&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2013"&amp;gt;2013&amp;lt;/option&amp;gt; 30 4 2013&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2012"&amp;gt;2012&amp;lt;/option&amp;gt; 30 4 2012&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2011"&amp;gt;2011&amp;lt;/option&amp;gt; 30 4 2011&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2010"&amp;gt;2010&amp;lt;/option&amp;gt; 30 4 2010&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2009"&amp;gt;2009&amp;lt;/option&amp;gt; 30 4 2009&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2008"&amp;gt;2008&amp;lt;/option&amp;gt; 30 4 2008&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2007"&amp;gt;2007&amp;lt;/option&amp;gt; 30 4 2007&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2006"&amp;gt;2006&amp;lt;/option&amp;gt; 30 4 2006&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2005"&amp;gt;2005&amp;lt;/option&amp;gt; 30 4 2005&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2004"&amp;gt;2004&amp;lt;/option&amp;gt; 30 4 2004&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2003"&amp;gt;2003&amp;lt;/option&amp;gt; 30 4 2003&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2002"&amp;gt;2002&amp;lt;/option&amp;gt; 30 4 2002&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2001"&amp;gt;2001&amp;lt;/option&amp;gt; 30 4 2001&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2000"&amp;gt;2000&amp;lt;/option&amp;gt; 30 4 2000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="1999"&amp;gt;1999&amp;lt;/option&amp;gt; 30 4 1999&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="1998"&amp;gt;1998&amp;lt;/option&amp;gt; 30 4 1998&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="1997"&amp;gt;1997&amp;lt;/option&amp;gt; 30 4 1997&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="1996"&amp;gt;1996&amp;lt;/option&amp;gt; 30 4 1996&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 01:40:18 GMT</pubDate>
    <dc:creator>pkm_edu</dc:creator>
    <dc:date>2023-06-10T01:40:18Z</dc:date>
    <item>
      <title>PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879980#M347645</link>
      <description>&lt;PRE&gt;A call to PRXPOSN in the code snippet below gives me the capture buffer's &lt;BR /&gt;START value (where regex begins matching) of 30 and the END value (which &lt;BR /&gt;represents the length of matching string) value of 4 (output below).&lt;BR /&gt;&lt;BR /&gt;However, when I count the number of characters from left &lt;BR /&gt;to right in the output (html_line string), I find the START value to be 22. &lt;BR /&gt;&lt;BR /&gt;Question 1: Why do these two numbers not match?&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;filename source temp;
proc http
     url = "https://meps.ahrq.gov/data_stats/download_data_files.jsp"
     out=source;
run;

data year_values;
  	length year $4;
	infile source length = reclen lrecl = 32767 end=eof;
	re = prxparse('/&amp;lt;option value="\d{4}"&amp;gt;(\d{4})&amp;lt;\/option&amp;gt;/');
  	/* Read the HTML line by line */
	do while (not eof);
		input html_line $varying32767. reclen;
         Len_html_line = length(html_line);
         /* Match and extract the years using regular expressions */
	    if prxmatch(re, html_line) &amp;gt; 0 then do;
       		call prxposn(re, 1, start, end);
      		year = substr(html_line, start, end);
	      	output year_values;
	    end;
	end;
run;
proc print data=year_values noobs;
var Len_html_line html_line start end year;
run;
&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="3"&gt;The Output:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="3"&gt;Len_&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;html_&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;line html_line start end year&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2021"&amp;gt;2021&amp;lt;/option&amp;gt; 30 4 2021&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2020"&amp;gt;2020&amp;lt;/option&amp;gt; 30 4 2020&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2019"&amp;gt;2019&amp;lt;/option&amp;gt; 30 4 2019&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2018"&amp;gt;2018&amp;lt;/option&amp;gt; 30 4 2018&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2017"&amp;gt;2017&amp;lt;/option&amp;gt; 30 4 2017&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2016"&amp;gt;2016&amp;lt;/option&amp;gt; 30 4 2016&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2015"&amp;gt;2015&amp;lt;/option&amp;gt; 30 4 2015&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2014"&amp;gt;2014&amp;lt;/option&amp;gt; 30 4 2014&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2013"&amp;gt;2013&amp;lt;/option&amp;gt; 30 4 2013&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2012"&amp;gt;2012&amp;lt;/option&amp;gt; 30 4 2012&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2011"&amp;gt;2011&amp;lt;/option&amp;gt; 30 4 2011&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2010"&amp;gt;2010&amp;lt;/option&amp;gt; 30 4 2010&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2009"&amp;gt;2009&amp;lt;/option&amp;gt; 30 4 2009&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2008"&amp;gt;2008&amp;lt;/option&amp;gt; 30 4 2008&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2007"&amp;gt;2007&amp;lt;/option&amp;gt; 30 4 2007&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2006"&amp;gt;2006&amp;lt;/option&amp;gt; 30 4 2006&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2005"&amp;gt;2005&amp;lt;/option&amp;gt; 30 4 2005&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2004"&amp;gt;2004&amp;lt;/option&amp;gt; 30 4 2004&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2003"&amp;gt;2003&amp;lt;/option&amp;gt; 30 4 2003&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2002"&amp;gt;2002&amp;lt;/option&amp;gt; 30 4 2002&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2001"&amp;gt;2001&amp;lt;/option&amp;gt; 30 4 2001&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="2000"&amp;gt;2000&amp;lt;/option&amp;gt; 30 4 2000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="1999"&amp;gt;1999&amp;lt;/option&amp;gt; 30 4 1999&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="1998"&amp;gt;1998&amp;lt;/option&amp;gt; 30 4 1998&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="1997"&amp;gt;1997&amp;lt;/option&amp;gt; 30 4 1997&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;42 &amp;lt;option value="1996"&amp;gt;1996&amp;lt;/option&amp;gt; 30 4 1996&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 01:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879980#M347645</guid>
      <dc:creator>pkm_edu</dc:creator>
      <dc:date>2023-06-10T01:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879985#M347646</link>
      <description>&lt;P&gt;Probably because you printed the text using the $ format&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1686361984018.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84866i28BF340D5BC07233/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1686361984018.png" alt="Tom_0-1686361984018.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;instead of the $CHAR format.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_1-1686362015535.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84867iFB70FB6A6D028DE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_1-1686362015535.png" alt="Tom_1-1686362015535.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or worse you looked at the ODS output instead of the LISTING output.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_2-1686362041475.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84868i154A134DB1CA3538/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_2-1686362041475.png" alt="Tom_2-1686362041475.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But also watch out for the TAB characters (your example code also had tab characters in it)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try writing the values to a text file and read it in and display the lines using the LIST statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
filename listing temp;
data _null_;
  set year_values ;
  file listing;
  put html_line $char42. +1 start= ;
run;

data _null_;
  infile listing;
  input;
  list;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Results&lt;/P&gt;
&lt;PRE&gt;RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0

1   CHAR      ..  &amp;lt;option value="2021"&amp;gt;2021&amp;lt;/option&amp;gt; start=30 51
    ZONE  222200223677666276676323333233333326776663277677333
    NUMR  00009900CF049FE061C55D220212E2021CFF049FEE034124D30

2   CHAR      ..  &amp;lt;option value="2020"&amp;gt;2020&amp;lt;/option&amp;gt; start=30 51
    ZONE  222200223677666276676323333233333326776663277677333
    NUMR  00009900CF049FE061C55D220202E2020CFF049FEE034124D30

3   CHAR      ..  &amp;lt;option value="2019"&amp;gt;2019&amp;lt;/option&amp;gt; start=30 51
    ZONE  222200223677666276676323333233333326776663277677333
    NUMR  00009900CF049FE061C55D220192E2019CFF049FEE034124D30

4   CHAR      ..  &amp;lt;option value="2018"&amp;gt;2018&amp;lt;/option&amp;gt; start=30 51
    ZONE  222200223677666276676323333233333326776663277677333
    NUMR  00009900CF049FE061C55D220182E2018CFF049FEE034124D30

5   CHAR      ..  &amp;lt;option value="2017"&amp;gt;2017&amp;lt;/option&amp;gt; start=30 51
    ZONE  222200223677666276676323333233333326776663277677333
    NUMR  00009900CF049FE061C55D220172E2017CFF049FEE034124D30

6   CHAR      ..  &amp;lt;option value="2016"&amp;gt;2016&amp;lt;/option&amp;gt; start=30 51
    ZONE  222200223677666276676323333233333326776663277677333
    NUMR  00009900CF049FE061C55D220162E2016CFF049FEE034124D30

...&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Jun 2023 02:00:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879985#M347646</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-10T02:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879986#M347647</link>
      <description>&lt;P&gt;You could just let SAS do most of the work instead.&amp;nbsp; Just use&amp;nbsp;@ string syntax of INPUT to find where the next field is located.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data year_values;
  length year 8;
  infile source end=eof dlm='&amp;lt;';
  input @'&amp;lt;option value="' @'&amp;gt;' year ?? @@;
  html_line=_infile_;
  if year in (1800:2500) then output;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;Obs    year                  html_line

  1    2021    		  &amp;lt;option value="2021"&amp;gt;2021&amp;lt;/option&amp;gt;
  2    2020    		  &amp;lt;option value="2020"&amp;gt;2020&amp;lt;/option&amp;gt;
  3    2019    		  &amp;lt;option value="2019"&amp;gt;2019&amp;lt;/option&amp;gt;
  4    2018    		  &amp;lt;option value="2018"&amp;gt;2018&amp;lt;/option&amp;gt;
  5    2017    		  &amp;lt;option value="2017"&amp;gt;2017&amp;lt;/option&amp;gt;
  6    2016    		  &amp;lt;option value="2016"&amp;gt;2016&amp;lt;/option&amp;gt;
  7    2015    		  &amp;lt;option value="2015"&amp;gt;2015&amp;lt;/option&amp;gt;
  8    2014    		  &amp;lt;option value="2014"&amp;gt;2014&amp;lt;/option&amp;gt;
  9    2013    		  &amp;lt;option value="2013"&amp;gt;2013&amp;lt;/option&amp;gt;
 10    2012    		  &amp;lt;option value="2012"&amp;gt;2012&amp;lt;/option&amp;gt;
 11    2011    		  &amp;lt;option value="2011"&amp;gt;2011&amp;lt;/option&amp;gt;
 12    2010    		  &amp;lt;option value="2010"&amp;gt;2010&amp;lt;/option&amp;gt;
 13    2009    		  &amp;lt;option value="2009"&amp;gt;2009&amp;lt;/option&amp;gt;
 14    2008    		  &amp;lt;option value="2008"&amp;gt;2008&amp;lt;/option&amp;gt;
 15    2007    		  &amp;lt;option value="2007"&amp;gt;2007&amp;lt;/option&amp;gt;
 16    2006    		  &amp;lt;option value="2006"&amp;gt;2006&amp;lt;/option&amp;gt;
 17    2005    		  &amp;lt;option value="2005"&amp;gt;2005&amp;lt;/option&amp;gt;
 18    2004    		  &amp;lt;option value="2004"&amp;gt;2004&amp;lt;/option&amp;gt;
 19    2003    		  &amp;lt;option value="2003"&amp;gt;2003&amp;lt;/option&amp;gt;
 20    2002    		  &amp;lt;option value="2002"&amp;gt;2002&amp;lt;/option&amp;gt;
 21    2001    		  &amp;lt;option value="2001"&amp;gt;2001&amp;lt;/option&amp;gt;
 22    2000    		  &amp;lt;option value="2000"&amp;gt;2000&amp;lt;/option&amp;gt;
 23    1999    		  &amp;lt;option value="1999"&amp;gt;1999&amp;lt;/option&amp;gt;
 24    1998    		  &amp;lt;option value="1998"&amp;gt;1998&amp;lt;/option&amp;gt;
 25    1997    		  &amp;lt;option value="1997"&amp;gt;1997&amp;lt;/option&amp;gt;
 26    1996    		  &amp;lt;option value="1996"&amp;gt;1996&amp;lt;/option&amp;gt;
&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Jun 2023 02:09:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879986#M347647</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-10T02:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879987#M347648</link>
      <description>&lt;P&gt;Another thing to consider is the EXPANDTABS option of the INFILE statement.&lt;/P&gt;
&lt;PRE&gt;1035  options generic;
1036  data year_values;
1037    length year 8;
1038    infile source dlm='&amp;lt;' expandtabs;
1039    input @'&amp;lt;option value="' @'&amp;gt;' year ?? @@;
1040    if year in (1900:2100);
1041    list;
1042  run;

NOTE: The infile SOURCE is:
      (system-specific pathname),
      (system-specific file attributes)

RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
741                         &amp;lt;option value="2021"&amp;gt;2021&amp;lt;/option&amp;gt; 52
744                         &amp;lt;option value="2020"&amp;gt;2020&amp;lt;/option&amp;gt; 52
747                         &amp;lt;option value="2019"&amp;gt;2019&amp;lt;/option&amp;gt; 52
750                         &amp;lt;option value="2018"&amp;gt;2018&amp;lt;/option&amp;gt; 52
753                         &amp;lt;option value="2017"&amp;gt;2017&amp;lt;/option&amp;gt; 52
756                         &amp;lt;option value="2016"&amp;gt;2016&amp;lt;/option&amp;gt; 52
759                         &amp;lt;option value="2015"&amp;gt;2015&amp;lt;/option&amp;gt; 52
762                         &amp;lt;option value="2014"&amp;gt;2014&amp;lt;/option&amp;gt; 52
765                         &amp;lt;option value="2013"&amp;gt;2013&amp;lt;/option&amp;gt; 52
768                         &amp;lt;option value="2012"&amp;gt;2012&amp;lt;/option&amp;gt; 52
771                         &amp;lt;option value="2011"&amp;gt;2011&amp;lt;/option&amp;gt; 52
774                         &amp;lt;option value="2010"&amp;gt;2010&amp;lt;/option&amp;gt; 52
777                         &amp;lt;option value="2009"&amp;gt;2009&amp;lt;/option&amp;gt; 52
780                         &amp;lt;option value="2008"&amp;gt;2008&amp;lt;/option&amp;gt; 52
783                         &amp;lt;option value="2007"&amp;gt;2007&amp;lt;/option&amp;gt; 52
786                         &amp;lt;option value="2006"&amp;gt;2006&amp;lt;/option&amp;gt; 52
789                         &amp;lt;option value="2005"&amp;gt;2005&amp;lt;/option&amp;gt; 52
792                         &amp;lt;option value="2004"&amp;gt;2004&amp;lt;/option&amp;gt; 52
795                         &amp;lt;option value="2003"&amp;gt;2003&amp;lt;/option&amp;gt; 52
798                         &amp;lt;option value="2002"&amp;gt;2002&amp;lt;/option&amp;gt; 52
801                         &amp;lt;option value="2001"&amp;gt;2001&amp;lt;/option&amp;gt; 52
804                         &amp;lt;option value="2000"&amp;gt;2000&amp;lt;/option&amp;gt; 52
807                         &amp;lt;option value="1999"&amp;gt;1999&amp;lt;/option&amp;gt; 52
810                         &amp;lt;option value="1998"&amp;gt;1998&amp;lt;/option&amp;gt; 52
813                         &amp;lt;option value="1997"&amp;gt;1997&amp;lt;/option&amp;gt; 52
816                         &amp;lt;option value="1996"&amp;gt;1996&amp;lt;/option&amp;gt; 52
NOTE: 3244 records were read from the infile (system-specific pathname).
      The minimum record length was 0.
      The maximum record length was 452.
NOTE: SAS went to a new line when INPUT @'CHARACTER_STRING' scanned past the end of a line.
NOTE: The data set WORK.YEAR_VALUES has 26 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Jun 2023 02:16:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879987#M347648</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-10T02:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879988#M347649</link>
      <description>Hello Tom,&lt;BR /&gt;Mine is from the listing output, not the ODS output.&lt;BR /&gt;Do you see anything wrong with the NPUT statement below?&lt;BR /&gt;I used a similar syntax for hundreds of  PROC HTTP response data files. No issues,&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;data year_values;&lt;BR /&gt;        length year $4;&lt;BR /&gt;        infile source length = reclen lrecl = 32767 end=eof;&lt;BR /&gt;        re = prxparse('/(\d{4})&amp;lt;\/option&amp;gt;/');&lt;BR /&gt;        /* Read the HTML line by line */&lt;BR /&gt;        do while (not eof);&lt;BR /&gt;                input html_line $varying32767. reclen;&lt;BR /&gt;         Len_html_line = length(html_line);&lt;BR /&gt;         /* Match and extract the years using regular expressions */&lt;BR /&gt;            if prxmatch(re, html_line) &amp;gt; 0 then do;&lt;BR /&gt;                call prxposn(re, 1, start, end);&lt;BR /&gt;                year = substr(html_line, start, end);&lt;BR /&gt;                output year_values;&lt;BR /&gt;            end;&lt;BR /&gt;        end;&lt;BR /&gt;run;&lt;BR /&gt;</description>
      <pubDate>Sat, 10 Jun 2023 02:17:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879988#M347649</guid>
      <dc:creator>pkm_edu</dc:creator>
      <dc:date>2023-06-10T02:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879989#M347650</link>
      <description>&lt;P&gt;It is not the INPUT statement.&amp;nbsp; It is the fact that you did not attach the $CHAR format to the variable.&amp;nbsp; That will cause SAS to use the normal $ format, which left aligns the values.&amp;nbsp; The only reason it looked like there were some spaces is because of the TAB characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As to the INPUT statement there are two issues:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The input statement will only read the first 32,767 bytes of the line.&lt;/P&gt;
&lt;P&gt;Since it does not have a trailing&amp;nbsp;@ the logic will only work for HTML files that has each &amp;lt;option&amp;gt; value on a separate line.&amp;nbsp; In general that might not be true for an HTML file.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 02:23:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879989#M347650</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-10T02:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879990#M347651</link>
      <description>format html_line $char50.;&lt;BR /&gt;Adding the above SAS statement did not change the output.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 10 Jun 2023 02:33:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879990#M347651</guid>
      <dc:creator>pkm_edu</dc:creator>
      <dc:date>2023-06-10T02:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879995#M347656</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;
&lt;P&gt;Thank you so much for sending me two solutions to reading highly unstructured data into SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Questions: Why does SAS issue the following note? Is this something that we need to be concerned about?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: SAS went to a new line when INPUT @'CHARACTER_STRING' scanned past the end of a line&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 05:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/879995#M347656</guid>
      <dc:creator>pkm_edu</dc:creator>
      <dc:date>2023-06-10T05:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880002#M347662</link>
      <description>&lt;P&gt;Sorry, I got&amp;nbsp; three more&amp;nbsp; clarification questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) In DATA step below, I have changed the conditional IF statement to '&lt;FONT face="courier new,courier"&gt;if not missing (year)&lt;/FONT&gt;;'&amp;nbsp; in&amp;nbsp;&lt;SPAN&gt;order to filter out&amp;nbsp; the observations with missing values for the numeric variable year.&amp;nbsp; Does this code change make sense to you?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) The&amp;nbsp; @'&amp;lt;option value="' will cause SAS to move&amp;nbsp; its&amp;nbsp; pointer past the '&amp;lt;option value="' field.&amp;nbsp; Then&amp;nbsp; the&amp;nbsp;&amp;nbsp;@'&amp;gt;' will make SAS move&amp;nbsp; its pointer past the '&amp;gt;' field&lt;BR /&gt;to read the numeric value, for example, 2021 (not&amp;nbsp;"2021").&amp;nbsp; Is this a correct code explanation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3)&amp;nbsp; The ?? modifier suppresses&amp;nbsp; the following&amp;nbsp; notes (examples from the partial SAS Log),&lt;/P&gt;
&lt;P&gt;NOTE: Invalid data for year in line 738 39-57.&lt;BR /&gt;RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0&lt;BR /&gt;738 &amp;lt;option value="All"&amp;gt;All available years&amp;lt;/option&amp;gt; 66&lt;BR /&gt;year=. _ERROR_=1 _N_=1&lt;BR /&gt;Is this a correct code explanation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;options generic;
data year_values3;
length year 8;
infile source dlm='&amp;lt;' expandtabs;
input @@'&amp;lt;option value="'   @'&amp;gt;' year ?? @@;
 if not missing (year);
list;
run&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Jun 2023 13:41:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880002#M347662</guid>
      <dc:creator>pkm_edu</dc:creator>
      <dc:date>2023-06-10T13:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880003#M347663</link>
      <description>Correction"&lt;BR /&gt;input @'&amp;lt;option value="'   @'&amp;gt;' year ?? @@;</description>
      <pubDate>Sat, 10 Jun 2023 13:58:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880003#M347663</guid>
      <dc:creator>pkm_edu</dc:creator>
      <dc:date>2023-06-10T13:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880017#M347675</link>
      <description>&lt;P&gt;That is how the INPUT statement normally works when you have not added the TRUNCOVER (or the deprecated MISSSOVER) option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And it is what I wanted it to do.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So instead of having to read each line and check if has the string I am just letting the INPUT statement find the next occurrence of the string.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 16:20:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880017#M347675</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-10T16:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880018#M347676</link>
      <description>&lt;P&gt;1) Just testing for missing year will allow option values of 5 or 10 or 1.234E12 to be read as a year.&amp;nbsp; &amp;nbsp;By using the IN operator with a range of integers I insure that the value is reasonable.&amp;nbsp; Not your regular expression would filter to just 4 digit numbers (or really the last 4 digits) so it will also find invalid year values, like 1000.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)&amp;nbsp; Yes.&amp;nbsp; And that might not be the right way to do it.&amp;nbsp; It depends on what information you want from the HTML code. The string &amp;lt;option value="ABC"&amp;gt;XYZ&amp;lt;/option&amp;gt;&amp;nbsp; will show the XYZ in the browser but return the ABC as the result when selected.&amp;nbsp; In your example form both have the same string.&amp;nbsp; So the code I showed is taking the XYZ value.&amp;nbsp; You might want to re-work it to take the ABC value.&amp;nbsp; &amp;nbsp;Can you tell what needs to change to do that?&lt;/P&gt;
&lt;LI-SPOILER&gt;Remove the extra&amp;nbsp;@'&amp;lt;' from the INPUT statement and change the DLM= option on the INFILE statement to DLM='"'.&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) Yes the ?? suppresses the error message and the setting of the _ERROR_ flag variable that cause those notes when value being read, in this case the next "word" on the line, is not valid for the informat being used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 16:31:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880018#M347676</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-10T16:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880064#M347707</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Here is the revised code I tried. It has worked for me.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Question 1:&amp;nbsp; I did not use the&amp;nbsp;@@&amp;nbsp; in the INPUT statement because the data&amp;nbsp;&lt;SPAN&gt;file does not have multiple&amp;nbsp; YEAR records on the same line. Does not using the @@&amp;nbsp;make sense to you?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Question 2: Sorry I could not find the&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/193883"&gt;@Syntax&lt;/a&gt; of INPUT in the SAS(R) Documentation. Could you please send me a reference, if possible?&lt;/P&gt;
&lt;P&gt;Question 3:&amp;nbsp; What does the generic option on the OPTIONS statement do? Any reference?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;options generic;
data year_values;
    length year 8;
    infile source dlm='"' expandtabs;
    input @'&amp;lt;option value="' year  ??;
    if year in (1900:2023);
run;
proc print data=year_values;
run;
&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Jun 2023 17:00:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880064#M347707</guid>
      <dc:creator>pkm_edu</dc:creator>
      <dc:date>2023-06-11T17:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880065#M347708</link>
      <description>&lt;P&gt;Sorry, I&amp;nbsp; would like to add the following comments, which I missed earlier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1)&amp;nbsp; It seems that the EXPANDTABS option on the INFILE statement is redundant. To avoid the following note in the SAS Log, I used the TRUNCOVER option on the same statement.&lt;/P&gt;
&lt;P&gt;NOTE: SAS went to a new line when INPUT @'CHARACTER_STRING' scanned past the end of a line.&lt;/P&gt;
&lt;P&gt;2) To get the desired results your earlier code&amp;nbsp; works fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;infile source dlm='&amp;lt;' truncover;&lt;BR /&gt;input @'&amp;lt;option value="' @'&amp;gt;' year ??;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;filename source 'c:\Data\web_data';
proc http
     url = "https://meps.ahrq.gov/data_stats/download_data_files.jsp"
     out=source;
run;

options generic;
data year_values;
    length year 8;
    infile source dlm='&amp;lt;' truncover;
    input @'&amp;lt;option value="'   @'&amp;gt;' year ??;
if not missing (year); /* no invalid year values possible */
run;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Jun 2023 17:52:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880065#M347708</guid>
      <dc:creator>pkm_edu</dc:creator>
      <dc:date>2023-06-11T17:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880080#M347716</link>
      <description>&lt;P&gt;You only need the EXPANDTABS option to replace the tabs with the appropriate number of spaces if you are planning to use the line from the file for something.&amp;nbsp; Like in your original program where you saved it and parsed it, or like in my program where I used the LIST statement to display it on the LOG so you can make sure it worked properly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unless of course there is a tab in the middle of the value you are trying to read in the YEAR.&amp;nbsp; SAS will not input '&amp;lt;tab&amp;gt;1999' as a number but it would input '&amp;nbsp; &amp;nbsp;1999' as a number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The secret GENERIC option was just so the log I posted wouldn't show the irrelevant details about where the file being read was located on my SAS server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Adding the TRUNCOVER option means that the data step will have to iterate once for each line in the HTML file instead of just once for each occurrence of the OPTION tag.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also your method has eliminated the possibility of detecting multiple OPTION tags on the same line of the HTML file.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 20:35:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880080#M347716</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-11T20:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: PRXPOSN Capture Buffer Start Value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880107#M347735</link>
      <description>&lt;P&gt;1) I agree with you&amp;nbsp; about&amp;nbsp; the use of&amp;nbsp; EXPANDTABS on the INFILE statement, which I have added to the code below. Thanks for clarification!&lt;/P&gt;
&lt;P&gt;2) I want only one "year" value per observation from each record. That is why I did not use the&amp;nbsp;@@ at the end of the INPUT statement in the code below.&lt;/P&gt;
&lt;P&gt;3)&amp;nbsp; &lt;SPAN&gt;I have used the&amp;nbsp; TRUNCOVER option to eliminate the&amp;nbsp; note, "SAS went to a new line" message.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;DM "Log; clear; output; clear; odsresults; clear";
filename source temp;
proc http
     url = "https://meps.ahrq.gov/data_stats/download_data_files.jsp"
     out=source;
run;

options generic;
data year_values;
    length year 8;
    infile source dlm='&amp;lt;' expandtabs truncover;
    input @'&amp;lt;option value="'   @'&amp;gt;' year ??;
if not missing (year);
run;

proc print data=year_values;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 23:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXPOSN-Capture-Buffer-Start-Value/m-p/880107#M347735</guid>
      <dc:creator>pkm_edu</dc:creator>
      <dc:date>2023-06-11T23:13:51Z</dc:date>
    </item>
  </channel>
</rss>

