<?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 function requires a character argument in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/INPUT-function-requires-a-character-argument/m-p/420829#M12918</link>
    <description>&lt;P style="margin: 0in 0in 8pt;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;The first argument of the INPUT function must be character and the second argument specifies an informat that you wish to use to read that character value. This function returns a NUMERIC when you use a numeric informat and it returns a character value if the informat is CHARACTER. It is most often used to convert character values to numeric but it can also be used to apply a character informat to transform the original character value into a different character value.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0in 0in 8pt;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;In your case (and as PGStats indicates) you do not need to convert to numeric if your original value is already numeric. What is the original numeric value and do you need to transform it in some way? &lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2017 15:22:50 GMT</pubDate>
    <dc:creator>DavidGhan</dc:creator>
    <dc:date>2017-12-13T15:22:50Z</dc:date>
    <item>
      <title>INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/INPUT-function-requires-a-character-argument/m-p/282788#M8063</link>
      <description>&lt;P&gt;Why am I getting this error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;INPUT function requires a character argument&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doesn't input function create numerical variables? Why is it saying that it needs a character argument?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sql; 
	create table hk_dados1 as 
		select subject_id as id,
				MRN,
				BASELINE_DOC,
				COLLECTION_CENTER as site_ca,
				BASELINE_DOB,
				BASELINE_AGE,
				BASELINE_SEX,
				BASELINE_MARITALSTATUS,
				BASELINE_EDUCATION,
				BASELINE_COUNTRYORIGIN,
				BASELINE_IMMIGRATIONDATE,
				BASELINE_LANGUAGES,
				BASELINE_ENGLISH,
				BASELINE_DOA,
				BASELINE_TIMEOFINJURYSTATUS,
				BASELINE_ATTEMPTEDRETURN,
				BASELINE_CURRENTWORKING,
				BASELINE_HTN,
				BASELINE_DIABETES,
				BASELINE_MENTAL,
				BASELINE_SCORE as BASELINE_PHQ_SCORE,
				BASELINE_SMOKER,
				BASELINE_ANNOY,
				BASELINE_GUILTY,
				BASELINE_EYEOPENER,
				BASELINE_NPRSHIP,
				BASELINE_NPRSKNEE,
				BASELINE_SF1,
				BASELINE_TOTAL as BASELINE_PCS_TOTAL,
				BASELINE_WTOTALSCORE,
			    DISCHARGE_DOC,
			   	input(DISCHARGE_DC_SITE,1.) as discharge_site,
				input(DISCHARGE_STREAM,1.) as discharge_stm,
				input(DISCHARGE_HR_RECOVERING,1.) as discharge_hr_recover,
				input(DISCHARGE_HR_HELPFUL,1.)  as discharge_hr_help,
				input(DISCHARGE_HR_SATISFACTION,1.) as discharge_hr_sat,
				input(DISCHARGE_HR_GENHEALTH,1.) as discharge_hr_genhel,
				input(DISCHARGE_WTOTALSCORE, 2.) as discharge_womac_score,
				input(DISCHARGE_SCORE,2.)  as discharge_phq,
				input (DISCHARGE_NPRSHIP, 2.) as discharge_npr_bn,
				input (DISCHARGE_NPRSKNEE, 2.) as discharge_npr_kn,
				input (DISCHARGE_TOTAL, 3.) as discharge_pcs,
				DISCHARGE_RTW_STATUS
	from temp.'All$'n; 
quit;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 20:25:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/INPUT-function-requires-a-character-argument/m-p/282788#M8063</guid>
      <dc:creator>christinagting0</dc:creator>
      <dc:date>2016-07-07T20:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/INPUT-function-requires-a-character-argument/m-p/282798#M8065</link>
      <description>&lt;P&gt;In your code, INPUT transforms character strings into numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt; &lt;EM&gt;result&lt;/EM&gt; = INPUT(&lt;EM&gt;arg1&lt;/EM&gt;, &lt;EM&gt;arg2&lt;/EM&gt;);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;arg1&lt;/EM&gt; must be a character string. If &lt;EM&gt;arg1&lt;/EM&gt; is already a number, you don't need to call INPUT.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 21:01:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/INPUT-function-requires-a-character-argument/m-p/282798#M8065</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-07-07T21:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/INPUT-function-requires-a-character-argument/m-p/420829#M12918</link>
      <description>&lt;P style="margin: 0in 0in 8pt;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;The first argument of the INPUT function must be character and the second argument specifies an informat that you wish to use to read that character value. This function returns a NUMERIC when you use a numeric informat and it returns a character value if the informat is CHARACTER. It is most often used to convert character values to numeric but it can also be used to apply a character informat to transform the original character value into a different character value.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0in 0in 8pt;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;In your case (and as PGStats indicates) you do not need to convert to numeric if your original value is already numeric. What is the original numeric value and do you need to transform it in some way? &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 15:22:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/INPUT-function-requires-a-character-argument/m-p/420829#M12918</guid>
      <dc:creator>DavidGhan</dc:creator>
      <dc:date>2017-12-13T15:22:50Z</dc:date>
    </item>
  </channel>
</rss>

