<?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: Information Check with IN LIST in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797536#M313554</link>
    <description>&lt;P&gt;I highly recommend taking the time to build a categorized list of valid codes and use that.&lt;/P&gt;
&lt;P&gt;The abbreviated strings you currently using as the IN2 dataset could be saved and used as a DESCRIPTIONS you could print for HUMANS to understand what the categories are.&amp;nbsp; That is what the XSLX file you posted is intended for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said to split that data into something you could program from turn each range into LOW/HIGH pair.&lt;/P&gt;
&lt;P&gt;Then you task of categorization because a simple join or you could create a FORMAT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data IN2;
  length row 8 category $32 item 8 low high $5 ;
  row+1;
  do category='ICD_O_3_Site','ICD_O_3_Histology','ICD_O_3_Behavior' ;
    input list :$200. @;
    do item=1 to countw(list,',');
      range=scan(list,item,',');
      low=scan(range,1,'-');
      high=scan(range,-1,'-');
      output;
    end;
  end;
  drop list range;
cards;
C000-C809      9835-9836                     3     001
C420-C421,C424 9811-9818,9837                3     001
C001           9831                          3     003
C000-C809      9383,9391-9394                0,1,3 017
C723           9380,9384,9400-9411,9420-9424 0,1,3 019
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Results&lt;/P&gt;
&lt;PRE&gt;Obs    row        category         item    low     high

  1     1     ICD_O_3_Site           1     C000    C809
  2     1     ICD_O_3_Histology      1     9835    9836
  3     1     ICD_O_3_Behavior       1     3       3
  4     2     ICD_O_3_Site           1     C420    C421
  5     2     ICD_O_3_Site           2     C424    C424
  6     2     ICD_O_3_Histology      1     9811    9818
  7     2     ICD_O_3_Histology      2     9837    9837
  8     2     ICD_O_3_Behavior       1     3       3
  9     3     ICD_O_3_Site           1     C001    C001
 10     3     ICD_O_3_Histology      1     9831    9831
 11     3     ICD_O_3_Behavior       1     3       3
 12     4     ICD_O_3_Site           1     C000    C809
 13     4     ICD_O_3_Histology      1     9383    9383
 14     4     ICD_O_3_Histology      2     9391    9394
 15     4     ICD_O_3_Behavior       1     0       0
 16     4     ICD_O_3_Behavior       2     1       1
 17     4     ICD_O_3_Behavior       3     3       3
 18     5     ICD_O_3_Site           1     C723    C723
 19     5     ICD_O_3_Histology      1     9380    9380
 20     5     ICD_O_3_Histology      2     9384    9384
 21     5     ICD_O_3_Histology      3     9400    9411
 22     5     ICD_O_3_Histology      4     9420    9424
 23     5     ICD_O_3_Behavior       1     0       0
 24     5     ICD_O_3_Behavior       2     1       1
 25     5     ICD_O_3_Behavior       3     3       3
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Feb 2022 04:45:36 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-02-21T04:45:36Z</dc:date>
    <item>
      <title>Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797441#M287535</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have the following datasets "INPUT" and "IN2"&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data INPUT;
	input hist $;
	cards;
	100
	105
	110
	110
;
run;

data IN2;&lt;BR /&gt;    length hist $15.;
	input hist $ label;
	cards;
	100-105,108 1
	110 3
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My goal is to get “label” of IN2 by matching "hist". "hist" of IN2 is given in a compact format with ranges and individual values. 100-105 means 100,101 ... 105.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inspired by another post, I was trying to use a DATA NULL step within a DATA step and convert "hist" into a list so I&amp;nbsp;can check whether a value is in that list. Below is what I was trying to do after all things get resolved:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;if hist in (100-105,108) then label = IN2.label
if hist in (110) then label = IN2.label&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here is my attempt:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data test;
	set input;
	RC=dosubl(cats('data _null_;                                     '
                ,'  set in2; '
				,'call symput("hist_list",hist);'
				,'if ', hist,  ' in (&amp;amp;hist_list) then do;'
				,'call symputx("lab",label);' 
				,'stop;'
				,'call symputx("lab"," ");'
				,'run;'));
	label=symget('lab');
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's one piece (out of 4) of error message:&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string,&lt;BR /&gt;a numeric constant, a datetime constant, a missing value, INPUT, PUT.&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: +, =.&lt;BR /&gt;ERROR 202-322: The option or parameter is not recognized and will be ignored.&lt;BR /&gt;ERROR: Undeclared array referenced: if110in.&lt;BR /&gt;WARNING: Apparent symbolic reference HIST_LIST not resolved.&lt;BR /&gt;ERROR: Variable if110in has not been declared as an array.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me troubleshoot this?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 03:35:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797441#M287535</guid>
      <dc:creator>TC_</dc:creator>
      <dc:date>2022-02-20T03:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797443#M287537</link>
      <description>&lt;P&gt;Looks like you don't know the correct syntax of the IN operator or the IF statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if hist in (100-105,108) then label = IN2.label
if hist in (110) then label = IN2.label&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is correct syntax but is nonsense code because LABEL is being assigned to itself:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if hist in ('100','101','102','103','104','105','108') then label = label;
if hist in ('110') then label = label;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note HIST is a character variable so when comparing it to a constant like 100, it needs to be enclosed in quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have no idea why you are trying to code this via DOSUBL. Code a solution that works without DOSUBL before burying it in that function.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 06:10:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797443#M287537</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-02-20T06:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797445#M287539</link>
      <description>&lt;P&gt;I know my attempt might look convoluted and unnecessary. It's because the datasets I have are more complicated than what I have shown. The sample data are simplified to show just enough details so people understand what type of data I am working with. For IN2, I wrote "100-105,108" and I actually have something like "9500-9580,9599,9610-9650,9652,9655" and on. And I have over 100 rows and 3 columns of data that are of a similar format.&lt;/P&gt;&lt;P&gt;Thank you for the input, I get all your point but it's not the solution I am looking for. If you have a smarter way than my attempt, I'd love to hear it.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 06:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797445#M287539</guid>
      <dc:creator>TC_</dc:creator>
      <dc:date>2022-02-20T06:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797454#M287547</link>
      <description>&lt;P&gt;Spread your IN2 dataset out vertically, so you can use it as a CNTLIN dataset for PROC FORMAT. Then apply that format, either to the variable or in a PUT function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data input;
input hist $;
cards;
100
105
110
110
;

data  in2;
length hist $15.;
input hist label;
cards;
100-105,108 1
110 3
;

data cntlin;
set in2 end=done;
fmtname = "$check";
do i1 = 1 to countw(hist,",");
  substring = scan(hist,i1,",");
  if indexc(substring,"-")
  then do i2 = input(scan(substring,1,"-"),3.) to input(scan(substring,2,"-"),3.);
    start = put(i2,3.);
    output;
  end;
  else do;
    start = substring;
    output;
  end;
end;
if done
then do;
  label = .;
  start = "OTHER";
  hlo = "O";
  output;
end;
keep start label fmtname hlo;
run;

proc format cntlin=cntlin;
run;

data want;
set input;
label = put(hist,$check.);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Similarly, you can use the vertical dataset for a JOIN/MERGE or as input to a hash object. As usual, see Maxim 19: Long Beats Wide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 11:04:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797454#M287547</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-20T11:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797480#M311217</link>
      <description>&lt;P&gt;Thank you for the input, Kurt. I did try to expand my IN2 dataset. But my actual IN2 dataset is actually a lot more complicated than the sample I have provided. After expanding all the ranges as you did, my IN2 dataset has over 400 million rows which is really hard to work with. And that's why I try to work with what's in IN2 as is.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 17:19:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797480#M311217</guid>
      <dc:creator>TC_</dc:creator>
      <dc:date>2022-02-20T17:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797493#M313524</link>
      <description>&lt;P&gt;If you have much wider ranges in your in2, you can use the end values as start and end in the CNTLIN dataset to define ranges. Be careful with ranges with character values, as "1500" will fall in the range "150" to "200". This can't happen with numeric values.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 20:09:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797493#M313524</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-20T20:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797496#M313527</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;is definitely pointing you in the right direction regarding the use of ranges in PROC FORMAT's &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p0owa4ftikc2ekn1q0rmpulg86cx.htm#p05g1cdvff8h8tn1frtzxrnkzezo" target="_blank" rel="noopener"&gt;CNTLIN&lt;/A&gt; option for creating user-defined formats. Please check out the documentation that I've linked to so you can understand how it works better. You will need to split ranges and single values into separate rows for example.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 20:44:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797496#M313527</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-02-20T20:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797504#M313531</link>
      <description>&lt;P&gt;Thank you both for the responses. Creating a format does work for the purpose of labeling the data when a single column of data is used to determine the label. And unfortunately the data I work with needs 3 columns to determine the corresponding label (Sorry I should have made this clear enough in my question). For example&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if Col1=10 &amp;amp; Col2=11 &amp;amp; Col3=10 then label =1;&lt;BR /&gt;if Col1=10 &amp;amp; Col2=12 &amp;amp; Col3=10 then label =2;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So applying a format as you two suggested does not work that well for this situation. But I agree that, when dealing with a single column, a format is a more straightforward and efficient approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 21:27:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797504#M313531</guid>
      <dc:creator>TC_</dc:creator>
      <dc:date>2022-02-20T21:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797509#M313536</link>
      <description>&lt;P&gt;You can still use a PROC FORMAT lookup with multiple columns by concatenating:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;label = put(strip(col1) !! strip(col2) !! strip(col3), $Lookup.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Do col1, col2 and col3 all have ranges or just col1? How many unique values are there for col1, col2, col3 combined?&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 22:20:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797509#M313536</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-02-20T22:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797515#M313540</link>
      <description>Hmm wow this opens up new possibilities... They all have ranges and individual values, separated by commas. Such as col1 may have 9800,9810-9820,9830-9835,9840,9850-9900 and col2 may have 0,2-3,5-10 etc.</description>
      <pubDate>Mon, 21 Feb 2022 01:23:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797515#M313540</guid>
      <dc:creator>TC_</dc:creator>
      <dc:date>2022-02-21T01:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797525#M313546</link>
      <description>&lt;P&gt;I would help if you posted more representative data for your three columns so we can get a clearer picture.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 02:45:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797525#M313546</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-02-21T02:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797531#M313549</link>
      <description>&lt;P&gt;My bad.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is some actual data I have:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data input;
	length ICD_O_3_Site $20.;
	length ICD_O_3_Histology $20.;
	length ICD_O_3_Behavior $10.;
	input ICD_O_3_Site $ ICD_O_3_Histology $ ICD_O_3_Behavior $;
	cards;
	C000 9835 3
	C420 9811 3
	C001 9831 3
	C300 9383 0
	C723 9380 1
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The IN2 dataset is attached in Excel format, you may directly import it. I wanted to get the "Extended Classification" for the cases listed above.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case you wonder,&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class=" language-sas"&gt;ICD_O_3_Site &lt;/CODE&gt;&lt;SPAN&gt;all starts with a "C" and it's safe to be removed when matching.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 03:32:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797531#M313549</guid>
      <dc:creator>TC_</dc:creator>
      <dc:date>2022-02-21T03:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797533#M313551</link>
      <description>&lt;P&gt;Can you supply the IN2 as DATALINES? Opening unknown spreadsheets is a security risk.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 03:57:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797533#M313551</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-02-21T03:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797535#M313553</link>
      <description>&lt;P&gt;OK here is a small portion:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data IN2;
	length ICD_O_3_Site $20.;
	length ICD_O_3_Histology $100.;
	length ICD_O_3_Behavior $10.;
	input ICD_O_3_Site $ ICD_O_3_Histology $ ICD_O_3_Behavior $ Extended_Classification $;
	cards;
	C000-C809 9835-9836 3 001
	C420-C421,C424 9811-9818,9837 3 001
	C001 9831 3 003
	C000-C809 9383,9391-9394 0,1,3 017
	C723 9380,9384,9400-9411,9420-9424 0,1,3 019
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Feb 2022 04:06:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797535#M313553</guid>
      <dc:creator>TC_</dc:creator>
      <dc:date>2022-02-21T04:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797536#M313554</link>
      <description>&lt;P&gt;I highly recommend taking the time to build a categorized list of valid codes and use that.&lt;/P&gt;
&lt;P&gt;The abbreviated strings you currently using as the IN2 dataset could be saved and used as a DESCRIPTIONS you could print for HUMANS to understand what the categories are.&amp;nbsp; That is what the XSLX file you posted is intended for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said to split that data into something you could program from turn each range into LOW/HIGH pair.&lt;/P&gt;
&lt;P&gt;Then you task of categorization because a simple join or you could create a FORMAT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data IN2;
  length row 8 category $32 item 8 low high $5 ;
  row+1;
  do category='ICD_O_3_Site','ICD_O_3_Histology','ICD_O_3_Behavior' ;
    input list :$200. @;
    do item=1 to countw(list,',');
      range=scan(list,item,',');
      low=scan(range,1,'-');
      high=scan(range,-1,'-');
      output;
    end;
  end;
  drop list range;
cards;
C000-C809      9835-9836                     3     001
C420-C421,C424 9811-9818,9837                3     001
C001           9831                          3     003
C000-C809      9383,9391-9394                0,1,3 017
C723           9380,9384,9400-9411,9420-9424 0,1,3 019
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Results&lt;/P&gt;
&lt;PRE&gt;Obs    row        category         item    low     high

  1     1     ICD_O_3_Site           1     C000    C809
  2     1     ICD_O_3_Histology      1     9835    9836
  3     1     ICD_O_3_Behavior       1     3       3
  4     2     ICD_O_3_Site           1     C420    C421
  5     2     ICD_O_3_Site           2     C424    C424
  6     2     ICD_O_3_Histology      1     9811    9818
  7     2     ICD_O_3_Histology      2     9837    9837
  8     2     ICD_O_3_Behavior       1     3       3
  9     3     ICD_O_3_Site           1     C001    C001
 10     3     ICD_O_3_Histology      1     9831    9831
 11     3     ICD_O_3_Behavior       1     3       3
 12     4     ICD_O_3_Site           1     C000    C809
 13     4     ICD_O_3_Histology      1     9383    9383
 14     4     ICD_O_3_Histology      2     9391    9394
 15     4     ICD_O_3_Behavior       1     0       0
 16     4     ICD_O_3_Behavior       2     1       1
 17     4     ICD_O_3_Behavior       3     3       3
 18     5     ICD_O_3_Site           1     C723    C723
 19     5     ICD_O_3_Histology      1     9380    9380
 20     5     ICD_O_3_Histology      2     9384    9384
 21     5     ICD_O_3_Histology      3     9400    9411
 22     5     ICD_O_3_Histology      4     9420    9424
 23     5     ICD_O_3_Behavior       1     0       0
 24     5     ICD_O_3_Behavior       2     1       1
 25     5     ICD_O_3_Behavior       3     3       3
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 04:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797536#M313554</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-21T04:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797546#M313557</link>
      <description>&lt;P&gt;This looks neat, thank you! Can you please explain what this line does?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input list :$200. @;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And can you please do the splitting starting with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data IN3;
    set IN2;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I tried to copy your do loop but didn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see that you are using "row" to be the categorization. But can you use the Extended Classification as given in IN2 directly? I know I can create a row number for my IN2 dataset and do a simple merge, but is there a way to do the same job without the merge?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 06:26:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797546#M313557</guid>
      <dc:creator>TC_</dc:creator>
      <dc:date>2022-02-21T06:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Information Check with IN LIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797605#M313576</link>
      <description>&lt;P&gt;Start by using PROC TRANSPOSE to move the category name out of the variable name into a variable.&amp;nbsp; Then you just need to use the inner DO loop to do the splitting.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 15:32:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Information-Check-with-IN-LIST/m-p/797605#M313576</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-21T15:32:02Z</dc:date>
    </item>
  </channel>
</rss>

