<?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 Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679460#M205180</link>
    <description>&lt;P&gt;I really hate to repeat myself, but:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;POST THE &lt;U&gt;WHOLE&lt;/U&gt; LOG AS ASKED!!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You left the keyword INPUT somewhere in your code where it's not needed, but I can't tell you where without seeing the WHOLE log. I hope you get the message now.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Aug 2020 13:32:22 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-08-26T13:32:22Z</dc:date>
    <item>
      <title>INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679429#M205164</link>
      <description>&lt;P&gt;On running the code below I have the following error messages. Can anyone help with correcting the code&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: #d80000; font-family: 'Courier New';"&gt;ERROR: INPUT function requires a character argument.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: #d80000; font-family: 'Courier New';"&gt;ERROR: Expression using greater than or equal (&amp;gt;=) has components that are of different data types.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; user = xxxx;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;LIBNAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; mdcrd_vw &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;TERADATA&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;SCHEMA&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=xxx_vdm_view_mdcr_prd &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;SERVER&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;"xxxprodp.xxxsvc.local"&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;CONNECTION&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=global &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;AUTHDOMAIN&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;"TD_&amp;amp;SYSUSERID."&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Zip5 (start_dt, end_dt);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;DROP TABLE &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;nfpp_trd.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;amp;user._BENE_2015_3_all;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;CREATE TABLE &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;nfpp_trd.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;amp;user._bENE_2015_3_all&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;(DBCREATE_TABLE_OPTS=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'PRIMARY INDEX(BENE_SK)'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) AS &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;SELECT DISTINCT T1.GEO_sk AS bene_zip_cd,&lt;/P&gt;&lt;P&gt;T1.GEO_ZIP4_CD,&lt;/P&gt;&lt;P&gt;T1.BENE_sk,&lt;/P&gt;&lt;P&gt;T2.GEO_FIPS_CNTY_CD,&lt;/P&gt;&lt;P&gt;t2.GEO_FIPS_STATE_CD&lt;/P&gt;&lt;P&gt;FROM mdcrd_vw.V2_MDCR_BENE_FCT_TRANS_HSTRY t1 LEFT JOIN&lt;/P&gt;&lt;P&gt;mdcrd_vw.V2_MDCR_GEO_ZIP9_CD T2 ON (T1.GEO_sk=T2.GEO_sk AND T1.GEO_ZIP4_CD=T2.GEO_ZIP4_CD)&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;BENE_PTA_STUS_CD =&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'Y'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;AND BENE_PTB_STUS_CD = &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'Y'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;AND BENE_CVRG_TYPE_CD = &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'9'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;and T1.BENE_DEATH_DT = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;and T1.IDR_LTST_TRANS_FLG = &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'Y'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;and t1.bene_fct_efctv_dt between input(&amp;amp;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;start_dt.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;date9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) and input(&amp;amp;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;end_dt.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;date9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;and t1.BENE_FCT_OBSLT_DT &amp;gt;=input(&amp;amp;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;start_dt.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;date9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; zip5;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;%&lt;/FONT&gt;&lt;STRONG&gt;&lt;I&gt;&lt;FONT face="Courier New" size="3" color="#686868"&gt;zip5&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; (&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;"01JAN2019"d&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;"31DEC2019"d&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;);&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 12:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679429#M205164</guid>
      <dc:creator>onyeajam</dc:creator>
      <dc:date>2020-08-26T12:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679437#M205166</link>
      <description>&lt;P&gt;Please post the &lt;EM&gt;whol&lt;/EM&gt;e log of the step by copy/pasting it into a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg"&gt;&lt;img src="https://communities.sas.com/skins/images/2FD96521DCF95C42FE57BF2A7CB72678/responsive_peak/images/image_not_found.png" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Since the position of the ERROR indicator is then kept, it makes it much easier for use to spot the problem point.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 12:59:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679437#M205166</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-26T12:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679438#M205167</link>
      <description>&lt;P&gt;Input function requires a character argument.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, here, your first argument to INPUT is not character. What are the values of these macro variables?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;and t1.bene_fct_efctv_dt between input(&amp;amp;start_dt.,date9.) and input(&amp;amp;end_dt.,date9.)
and t1.BENE_FCT_OBSLT_DT &amp;gt;=input(&amp;amp;start_dt.,date9.);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Aug 2020 13:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679438#M205167</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-26T13:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679440#M205168</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;and t1.bene_fct_efctv_dt between input(&amp;amp;start_dt.,date9.) and input(&amp;amp;end_dt.,date9.)
and t1.BENE_FCT_OBSLT_DT &amp;gt;=input(&amp;amp;start_dt.,date9.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This seem to be the offending parts.&lt;/P&gt;
&lt;P&gt;Since you call the macro with date literals:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%zip5 ("01JAN2019"d, "31DEC2019"d);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which are immediately converted to &lt;EM&gt;numeric&lt;/EM&gt; SAS date values, the INPUT function is not needed. It would be needed if you had omitted the trailing "d" characters that make a string a date literal.&lt;/P&gt;
&lt;P&gt;So you can simplify the offending lines to:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;and t1.bene_fct_efctv_dt between &amp;amp;start_dt. and &amp;amp;end_dt.
and t1.BENE_FCT_OBSLT_DT &amp;gt;= &amp;amp;start_dt.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Aug 2020 13:04:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679440#M205168</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-26T13:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679444#M205170</link>
      <description>Attached is the log&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Aug 2020 13:11:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679444#M205170</guid>
      <dc:creator>onyeajam</dc:creator>
      <dc:date>2020-08-26T13:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679447#M205171</link>
      <description>Start date is 01Jan2019 and end date is 31Dec2019.&lt;BR /&gt;So am I changing this&lt;BR /&gt;&lt;BR /&gt;&amp;amp;start_dt to 01jan2019&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Aug 2020 13:14:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679447#M205171</guid>
      <dc:creator>onyeajam</dc:creator>
      <dc:date>2020-08-26T13:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679450#M205172</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/343311"&gt;@onyeajam&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Attached is the log&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Ah ... no?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just copy/paste it into a code box as requested, no need for attaching anything.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 13:26:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679450#M205172</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-26T13:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679454#M205174</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/343311"&gt;@onyeajam&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Start date is 01Jan2019 and end date is 31Dec2019.&lt;BR /&gt;So am I changing this&lt;BR /&gt;&lt;BR /&gt;&amp;amp;start_dt to 01jan2019&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think you have missed the point. You don't have to change the values of the macro variables. You just remove the INPUT function, as shown by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 13:27:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679454#M205174</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-26T13:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679457#M205177</link>
      <description>I have corrected the statements as recommended to&lt;BR /&gt;&lt;BR /&gt;and t1.bene_fct_efctv_dt between &amp;amp;start_dt. and &amp;amp;end_dt.&lt;BR /&gt;and t1.BENE_FCT_OBSLT_DT &amp;gt;= &amp;amp;start_dt.;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But a New Error Message&lt;BR /&gt;&lt;BR /&gt;Note: Line generated by the macro var "START_DAT".&lt;BR /&gt;input "01JAN2019"d&lt;BR /&gt;Error 22-322: syntax error, expecting one of the following: !, !!, &amp;amp;, *,&lt;BR /&gt;**, +, -,?,&amp;lt;.&amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, AND, EQ, EQT, GE, GET, GROUP, GT, GTT,&lt;BR /&gt;HAVING, LE, LET, LT, LTT, NE, NET, OR&amp;lt; ORDER, ^=, |, ||, ~=.&lt;BR /&gt;Error 76-322: syntax error, statement will be ignored&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Aug 2020 13:29:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679457#M205177</guid>
      <dc:creator>onyeajam</dc:creator>
      <dc:date>2020-08-26T13:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679459#M205179</link>
      <description>me bad.&lt;BR /&gt;That is what I had in the attachment. But I made the corrections you&lt;BR /&gt;suggested and a new error like I said in my last reply&lt;BR /&gt;&lt;BR /&gt;1 The SAS&lt;BR /&gt;System 08:10 Wednesday, August 26, 2020&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;1 ;*';*";*/;quit;run;&lt;BR /&gt;&lt;BR /&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='marketsaturation.sas';&lt;BR /&gt;&lt;BR /&gt;4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';&lt;BR /&gt;&lt;BR /&gt;5 %LET _CLIENTPROJECTPATH='';&lt;BR /&gt;&lt;BR /&gt;6 %LET _CLIENTPROJECTPATHHOST='';&lt;BR /&gt;&lt;BR /&gt;7 %LET _CLIENTPROJECTNAME='';&lt;BR /&gt;&lt;BR /&gt;8 %LET _SASPROGRAMFILE='\\Client\H$\Secure\Market&lt;BR /&gt;Saturation\marketsaturation.sas';&lt;BR /&gt;&lt;BR /&gt;9 %LET _SASPROGRAMFILEHOST='CONCTXxxx';&lt;BR /&gt;&lt;BR /&gt;10&lt;BR /&gt;&lt;BR /&gt;11 ODS _ALL_ CLOSE;&lt;BR /&gt;&lt;BR /&gt;12 OPTIONS DEV=ACTIVEX;&lt;BR /&gt;&lt;BR /&gt;13 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;&lt;BR /&gt;14 %macro HTML5AccessibleGraphSupported;&lt;BR /&gt;&lt;BR /&gt;15 %if %_SAS_VERCOMP_FV(9,4,4, 0,0,0) &amp;gt;= 0 %then&lt;BR /&gt;ACCESSIBLE_GRAPH;&lt;BR /&gt;&lt;BR /&gt;16 %mend;&lt;BR /&gt;&lt;BR /&gt;17 FILENAME EGSR TEMP;&lt;BR /&gt;&lt;BR /&gt;18 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;BR /&gt;&lt;BR /&gt;19 STYLE=HTMLBlue&lt;BR /&gt;&lt;BR /&gt;20 NOGTITLE&lt;BR /&gt;&lt;BR /&gt;21 NOGFOOTNOTE&lt;BR /&gt;&lt;BR /&gt;22 GPATH=&amp;amp;sasworklocation&lt;BR /&gt;&lt;BR /&gt;23 ENCODING=UTF8&lt;BR /&gt;&lt;BR /&gt;24 options(rolap="on")&lt;BR /&gt;&lt;BR /&gt;25 ;&lt;BR /&gt;&lt;BR /&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;&lt;BR /&gt;26&lt;BR /&gt;&lt;BR /&gt;27 %let user = xxxx&lt;BR /&gt;&lt;BR /&gt;28&lt;BR /&gt;&lt;BR /&gt;29&lt;BR /&gt;&lt;BR /&gt;30 LIBNAME mdcrd_vw TERADATA SCHEMA=xxx_vdm_view_mdcr_prd&lt;BR /&gt;&lt;BR /&gt;31 SERVER="xxxprodp.xxxsvc.local" CONNECTION=global&lt;BR /&gt;AUTHDOMAIN="TD_&amp;amp;SYSUSERID.";&lt;BR /&gt;&lt;BR /&gt;NOTE: Credential obtained from SAS metadata server.&lt;BR /&gt;&lt;BR /&gt;NOTE: Libref MDCRD_VW was successfully assigned as follows:&lt;BR /&gt;&lt;BR /&gt;Engine: TERADATA&lt;BR /&gt;&lt;BR /&gt;Physical Name: xxxprodp.xxxsvc.local&lt;BR /&gt;&lt;BR /&gt;32&lt;BR /&gt;&lt;BR /&gt;33 %macro Zip5 (start_dt, end_dt);&lt;BR /&gt;&lt;BR /&gt;34&lt;BR /&gt;&lt;BR /&gt;35&lt;BR /&gt;&lt;BR /&gt;41 PROC SQL;&lt;BR /&gt;&lt;BR /&gt;42 DROP TABLE nfpp_trd.&amp;amp;user._BENE_2015_3_all;&lt;BR /&gt;&lt;BR /&gt;43 CREATE TABLE nfpp_trd.&amp;amp;user._bENE_2015_3_all&lt;BR /&gt;&lt;BR /&gt;44 (DBCREATE_TABLE_OPTS='PRIMARY INDEX(BENE_SK)') AS&lt;BR /&gt;&lt;BR /&gt;45 SELECT DISTINCT T1.GEO_sk AS bene_zip_cd,&lt;BR /&gt;&lt;BR /&gt;46 T1.GEO_ZIP4_CD,&lt;BR /&gt;&lt;BR /&gt;47 T1.BENE_sk,&lt;BR /&gt;&lt;BR /&gt;48 T2.GEO_FIPS_CNTY_CD,&lt;BR /&gt;&lt;BR /&gt;49 t2.GEO_FIPS_STATE_CD&lt;BR /&gt;&lt;BR /&gt;50 FROM mdcrd_vw.V2_MDCR_BENE_FCT_TRANS_HSTRY t1 LEFT JOIN&lt;BR /&gt;&lt;BR /&gt;51 mdcrd_vw.V2_MDCR_GEO_ZIP9_CD T2 ON (T1.GEO_sk=T2.GEO_sk&lt;BR /&gt;AND T1.GEO_ZIP4_CD=T2.GEO_ZIP4_CD)&lt;BR /&gt;&lt;BR /&gt;52 WHERE&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;53 2 The&lt;BR /&gt;SAS System 08:10 Wednesday, August 26, 2020&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;54&lt;BR /&gt;&lt;BR /&gt;55 BENE_PTA_STUS_CD ='Y'&lt;BR /&gt;&lt;BR /&gt;56 AND BENE_PTB_STUS_CD = 'Y'&lt;BR /&gt;&lt;BR /&gt;57 AND BENE_CVRG_TYPE_CD = '9'&lt;BR /&gt;&lt;BR /&gt;58 and T1.BENE_DEATH_DT = .&lt;BR /&gt;&lt;BR /&gt;59&lt;BR /&gt;&lt;BR /&gt;60 and T1.IDR_LTST_TRANS_FLG = 'Y'&lt;BR /&gt;&lt;BR /&gt;61 and t1.bene_fct_efctv_dt between input(&amp;amp;start_dt.,date9.)&lt;BR /&gt;and input(&amp;amp;end_dt.,date9.)&lt;BR /&gt;&lt;BR /&gt;62 and t1.BENE_FCT_OBSLT_DT &amp;gt;=input(&amp;amp;start_dt.,date9.);&lt;BR /&gt;&lt;BR /&gt;63&lt;BR /&gt;&lt;BR /&gt;64&lt;BR /&gt;&lt;BR /&gt;65 QUIT;&lt;BR /&gt;&lt;BR /&gt;66 %mend zip5;&lt;BR /&gt;&lt;BR /&gt;67 %zip5 ("01JAN2019"d, "31DEC2019"d);&lt;BR /&gt;&lt;BR /&gt;WARNING: File NFPP_TRD.PUX2_BENE_2015_3_all.DATA does not exist.&lt;BR /&gt;&lt;BR /&gt;WARNING: Table NFPP_TRD.PUX2_BENE_2015_3_all has not been dropped.&lt;BR /&gt;&lt;BR /&gt;ERROR: INPUT function requires a character argument.&lt;BR /&gt;&lt;BR /&gt;ERROR: INPUT function requires a character argument.&lt;BR /&gt;&lt;BR /&gt;ERROR: Expression using BETWEEN has components that are of different data&lt;BR /&gt;types.&lt;BR /&gt;&lt;BR /&gt;ERROR: INPUT function requires a character argument.&lt;BR /&gt;&lt;BR /&gt;ERROR: Expression using greater than or equal (&amp;gt;=) has components that are&lt;BR /&gt;of different data types.&lt;BR /&gt;&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of&lt;BR /&gt;statements.&lt;BR /&gt;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;&lt;BR /&gt;real time 0.59 seconds&lt;BR /&gt;&lt;BR /&gt;cpu time 0.02 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;68&lt;BR /&gt;&lt;BR /&gt;69 %LET _CLIENTTASKLABEL=;&lt;BR /&gt;&lt;BR /&gt;70 %LET _CLIENTPROCESSFLOWNAME=;&lt;BR /&gt;&lt;BR /&gt;71 %LET _CLIENTPROJECTPATH=;&lt;BR /&gt;&lt;BR /&gt;72 %LET _CLIENTPROJECTPATHHOST=;&lt;BR /&gt;&lt;BR /&gt;73 %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;&lt;BR /&gt;74 %LET _SASPROGRAMFILE=;&lt;BR /&gt;&lt;BR /&gt;75 %LET _SASPROGRAMFILEHOST=;&lt;BR /&gt;&lt;BR /&gt;76&lt;BR /&gt;&lt;BR /&gt;77 ;*';*";*/;quit;run;&lt;BR /&gt;&lt;BR /&gt;78 ODS _ALL_ CLOSE;&lt;BR /&gt;&lt;BR /&gt;79&lt;BR /&gt;&lt;BR /&gt;80&lt;BR /&gt;&lt;BR /&gt;81 QUIT; RUN;&lt;BR /&gt;&lt;BR /&gt;82&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Aug 2020 13:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679459#M205179</guid>
      <dc:creator>onyeajam</dc:creator>
      <dc:date>2020-08-26T13:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679460#M205180</link>
      <description>&lt;P&gt;I really hate to repeat myself, but:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;POST THE &lt;U&gt;WHOLE&lt;/U&gt; LOG AS ASKED!!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You left the keyword INPUT somewhere in your code where it's not needed, but I can't tell you where without seeing the WHOLE log. I hope you get the message now.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 13:32:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679460#M205180</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-26T13:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679463#M205181</link>
      <description>Sorry KurtBremser&lt;BR /&gt;&lt;BR /&gt;I am working with 2 PCs that are not communicating with each other.&lt;BR /&gt;I did not eliminate the last input, the reason for the new error I&lt;BR /&gt;believe. I have corrected and am rerunning. Will update you soon if&lt;BR /&gt;resolved or not.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Aug 2020 13:38:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679463#M205181</guid>
      <dc:creator>onyeajam</dc:creator>
      <dc:date>2020-08-26T13:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679499#M205190</link>
      <description>&lt;P&gt;Turn on the MPRINT option before calling the macro.&amp;nbsp; That way the SAS log will reflect the SAS code that the macro generated.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint;
%zip5 ("01JAN2019"d, "31DEC2019"d);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So with your original macro code and macro call you should see something like this in the log:&lt;/P&gt;
&lt;PRE&gt;MPRINT(ZIP5)  ....  input("01JAN2019"d,date9.) and input("31DEC2019"d,date9.) and t1.BENE_FCT_OBSLT_DT &amp;gt;=input("01JAN2019"d,date9.);&lt;/PRE&gt;
&lt;P&gt;Which is trying to execute read from a date value instead of a character string.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you change the call to use a quoted string instead of a date literal&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%zip5 ("01JAN2019", "31DEC2019");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then the code will look like this:&lt;/P&gt;
&lt;PRE&gt;MPRINT(ZIP5)  ....  input("01JAN2019",date9.) and input("31DEC2019",date9.) and t1.BENE_FCT_OBSLT_DT &amp;gt;=input("01JAN2019",date9.);&lt;/PRE&gt;
&lt;P&gt;Which is valid.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 14:33:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679499#M205190</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-08-26T14:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679510#M205192</link>
      <description>&lt;P&gt;Its an endless running of the program after i removed the input statment in offeding lines. Thus I had to kill the program.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;and t1.bene_fct_efctv_dt between &amp;amp;start_dt. and &amp;amp;end_dt.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;and t1.BENE_FCT_OBSLT_DT &amp;gt;= &amp;amp;start_dt.;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;%mend zip5;&lt;/P&gt;&lt;P&gt;%zip5 ("01JAN2019"d, "15JAN2019"d);&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 14:55:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679510#M205192</guid>
      <dc:creator>onyeajam</dc:creator>
      <dc:date>2020-08-26T14:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679516#M205194</link>
      <description>&lt;P&gt;Where does library&lt;/P&gt;
&lt;PRE&gt;nfpp_trd&lt;/PRE&gt;
&lt;P&gt;point to?&lt;/P&gt;
&lt;P&gt;Is the DISTINCT in the SELECT necessary?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 15:05:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679516#M205194</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-26T15:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679523#M205197</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&lt;BR /&gt;I went back to original code and change the call to use a quoted string instead of a date literal . That does not work too. Endless running of the program&lt;BR /&gt;and t1.bene_fct_efctv_dt between input(&amp;amp;start_dt.,date9.) and input(&amp;amp;end_dt.,date9.)&lt;BR /&gt;and t1.BENE_FCT_OBSLT_DT &amp;gt;=input(&amp;amp;start_dt.,date9.);&lt;BR /&gt;QUIT;&lt;BR /&gt;%mend zip5;&lt;BR /&gt;%zip5 ("01JAN2019", "31DEC2019");</description>
      <pubDate>Wed, 26 Aug 2020 15:15:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679523#M205197</guid>
      <dc:creator>onyeajam</dc:creator>
      <dc:date>2020-08-26T15:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679525#M205198</link>
      <description>&lt;P&gt;Although this has been mentioned several times before, you just take out the INPUT function, and your code will work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;and t1.bene_fct_efctv_dt between &amp;amp;start_dt and &amp;amp;end_dt 
and t1.BENE_FCT_OBSLT_DT &amp;gt;=&amp;amp;start_dt;
...
%zip5 ("01JAN2019"d, "31DEC2019"d);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Aug 2020 15:20:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679525#M205198</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-26T15:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679526#M205199</link>
      <description>Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&lt;BR /&gt;I did that and the program wont stop running. It was running for 20 minutes with nothing happening, so I KILLED IT</description>
      <pubDate>Wed, 26 Aug 2020 15:23:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679526#M205199</guid>
      <dc:creator>onyeajam</dc:creator>
      <dc:date>2020-08-26T15:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679528#M205200</link>
      <description>&lt;P&gt;SHOW US the actual code you are using. Just saying it didn't work tells us nothing. Also, how do you know this is a problem with the code? It could be that the TERADATA server is taking 20 minutes or more to do the extract.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 15:26:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679528#M205200</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-26T15:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT function requires a character argument</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679534#M205201</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/343311"&gt;@onyeajam&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&lt;BR /&gt;I went back to original code and change the call to use a quoted string instead of a date literal . That does not work too. Endless running of the program&lt;BR /&gt;and t1.bene_fct_efctv_dt between input(&amp;amp;start_dt.,date9.) and input(&amp;amp;end_dt.,date9.)&lt;BR /&gt;and t1.BENE_FCT_OBSLT_DT &amp;gt;=input(&amp;amp;start_dt.,date9.);&lt;BR /&gt;QUIT;&lt;BR /&gt;%mend zip5;&lt;BR /&gt;%zip5 ("01JAN2019", "31DEC2019");&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So you have solved this issue and are now on to a new issue.&amp;nbsp; Please open a new thread to talk about how to optimize queries using remote databases.&amp;nbsp; Here is a suggestion to try : It looks like you are joining two tables in your remote database so just use explicit passthru SQL to run the query on the database instead.&amp;nbsp; In that case you will want to replace the hardcoded date values with values that work with the SQL dialect used by that database.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 15:36:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-function-requires-a-character-argument/m-p/679534#M205201</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-08-26T15:36:59Z</dc:date>
    </item>
  </channel>
</rss>

