<?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: Input statement: How do I read multiple words as one string variable. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Input-statement-How-do-I-read-multiple-words-as-one-string/m-p/298058#M62642</link>
    <description>Thanks Kurt.</description>
    <pubDate>Tue, 13 Sep 2016 14:44:30 GMT</pubDate>
    <dc:creator>no_hassles</dc:creator>
    <dc:date>2016-09-13T14:44:30Z</dc:date>
    <item>
      <title>Input statement: How do I read multiple words as one string variable.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-statement-How-do-I-read-multiple-words-as-one-string/m-p/298050#M62637</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Hello everyone,&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;I am looking to read ICD10 diagnosis codes into one variable and the code description in another variable.&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;What is the input statement switch that will allow me to do this?&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;Example: Newborn only diagnosis codes and descriptions:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; sparcs.input_newborn_icd10_2017;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;INPUT&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; DX $ ;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DATALINES&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;A33 Tetanus neonatorum&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;E8411 Meconium ileus in cystic fibrosis&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;H04531 Neonatal obstruction of right nasolacrimal duct&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;H04532 Neonatal obstruction of left nasolacrimal duct&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;H04533 Neonatal obstruction of bilateral nasolacrimal duct&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;H04539 Neonatal obstruction of unspecified nasolacrimal duct&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;N470 Adherent prepuce, newborn&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z00110 Health examination for newborn under 8 days old&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z00111 Health examination for newborn 8 to 28 days old&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z3800 Single liveborn infant, delivered vaginally&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z3801 Single liveborn infant, delivered by cesarean&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z381 Single liveborn infant, born outside hospital&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z382 Single liveborn infant, unspecified as to place of birth&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z3830 Twin liveborn infant, delivered vaginally&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z3831 Twin liveborn infant, delivered by cesarean&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z384 Twin liveborn infant, born outside hospital&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z385 Twin liveborn infant, unspecified as to place of birth&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z3861 Triplet liveborn infant, delivered vaginally&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z3862 Triplet liveborn infant, delivered by cesarean&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z3863 Quadruplet liveborn infant, delivered vaginally&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z3864 Quadruplet liveborn infant, delivered by cesarean&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z3865 Quintuplet liveborn infant, delivered vaginally&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z3866 Quintuplet liveborn infant, delivered by cesarean&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z3868 Other multiple liveborn infant, delivered vaginally&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z3869 Other multiple liveborn infant, delivered by cesarean&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z387 Other multiple liveborn infant, born outside hospital&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Z388 Other multiple liveborn infant, unsp as to place of birth&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;This code reads in the ICD10 DX code and stops at the first blank character. Great.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;How do I read the rest of the data as one character variable, such as NBdescription?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;I will use this technique multiple times for the numerous code/description pairs I will come across.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;Thanks in advance.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;Stephen Dybas&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 14:24:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-statement-How-do-I-read-multiple-words-as-one-string/m-p/298050#M62637</guid>
      <dc:creator>no_hassles</dc:creator>
      <dc:date>2016-09-13T14:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Input statement: How do I read multiple words as one string variable.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-statement-How-do-I-read-multiple-words-as-one-string/m-p/298052#M62638</link>
      <description>&lt;P&gt;Use a sufficiently long informat to force formatted input, and the truncover option:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
infile cards truncover;
input DX $100.;
cards;
A33 Tetanus neonatorum
E8411 Meconium ileus in cystic fibrosis
H04531 Neonatal obstruction of right nasolacrimal duct
H04532 Neonatal obstruction of left nasolacrimal duct
H04533 Neonatal obstruction of bilateral nasolacrimal duct
H04539 Neonatal obstruction of unspecified nasolacrimal duct
N470 Adherent prepuce, newborn
Z00110 Health examination for newborn under 8 days old
Z00111 Health examination for newborn 8 to 28 days old
Z3800 Single liveborn infant, delivered vaginally
Z3801 Single liveborn infant, delivered by cesarean
Z381 Single liveborn infant, born outside hospital
Z382 Single liveborn infant, unspecified as to place of birth
Z3830 Twin liveborn infant, delivered vaginally
Z3831 Twin liveborn infant, delivered by cesarean
Z384 Twin liveborn infant, born outside hospital
Z385 Twin liveborn infant, unspecified as to place of birth
Z3861 Triplet liveborn infant, delivered vaginally
Z3862 Triplet liveborn infant, delivered by cesarean
Z3863 Quadruplet liveborn infant, delivered vaginally
Z3864 Quadruplet liveborn infant, delivered by cesarean
Z3865 Quintuplet liveborn infant, delivered vaginally
Z3866 Quintuplet liveborn infant, delivered by cesarean
Z3868 Other multiple liveborn infant, delivered vaginally
Z3869 Other multiple liveborn infant, delivered by cesarean
Z387 Other multiple liveborn infant, born outside hospital
Z388 Other multiple liveborn infant, unsp as to place of birth
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Sep 2016 14:25:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-statement-How-do-I-read-multiple-words-as-one-string/m-p/298052#M62638</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-09-13T14:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Input statement: How do I read multiple words as one string variable.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-statement-How-do-I-read-multiple-words-as-one-string/m-p/298058#M62642</link>
      <description>Thanks Kurt.</description>
      <pubDate>Tue, 13 Sep 2016 14:44:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-statement-How-do-I-read-multiple-words-as-one-string/m-p/298058#M62642</guid>
      <dc:creator>no_hassles</dc:creator>
      <dc:date>2016-09-13T14:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Input statement: How do I read multiple words as one string variable.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-statement-How-do-I-read-multiple-words-as-one-string/m-p/298063#M62646</link>
      <description>&lt;P&gt;Here's something you could try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;length nbDescription $ 200;&lt;/P&gt;
&lt;P&gt;input dx $ nbDescription $ &amp;amp;;&lt;/P&gt;
&lt;P&gt;datalines;&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 15:03:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-statement-How-do-I-read-multiple-words-as-one-string/m-p/298063#M62646</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-09-13T15:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Input statement: How do I read multiple words as one string variable.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-statement-How-do-I-read-multiple-words-as-one-string/m-p/298067#M62647</link>
      <description>Thanks. That's what the switch I was looking for.</description>
      <pubDate>Tue, 13 Sep 2016 15:09:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-statement-How-do-I-read-multiple-words-as-one-string/m-p/298067#M62647</guid>
      <dc:creator>no_hassles</dc:creator>
      <dc:date>2016-09-13T15:09:18Z</dc:date>
    </item>
  </channel>
</rss>

