<?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: what is the ouptput for this sas code? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424062#M104363</link>
    <description>&lt;P&gt;Just follow the code you submitted in your most recent example.&lt;/P&gt;
&lt;PRE&gt;DATA CAPITALIZE;
INFORMAT FIRST LAST $30.;
INPUT FIRST $ LAST $;
    FIRST = LOWCASE(FIRST);
    LAST = LOWCASE(LAST);
SUBSTR(FIRST,1,1) = UPCASE(SUBSTR(FIRST,1,1));
SUBSTR(LAST,1,1) = UPCASE(SUBSTR(LAST,1,1));
DATALINES;
ronaldcODy THomaSeDISON
;
run;&lt;/PRE&gt;
&lt;P&gt;You're reading one record that has two strings:&lt;/P&gt;
&lt;PRE&gt;first=ronaldcODy 
and
last=THomaSeDISON&lt;/PRE&gt;
&lt;P&gt;You're then making all of the letters, of both, to be lower case. i.e.,&lt;/P&gt;
&lt;PRE&gt;ronaldcody
and
thomasedison&lt;/PRE&gt;
&lt;P&gt;You're then make the first letter, of each, to be uppercase:&lt;/P&gt;
&lt;PRE&gt;Ronaldcody
and
Thomasedison&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Dec 2017 17:00:04 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2017-12-29T17:00:04Z</dc:date>
    <item>
      <title>what is the ouptput for this sas code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424042#M104355</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA CAPITALIZE;
INFORMAT FIRST LAST $30.;
INPUT FIRST $ LAST $;
    FIRST = LOWCASE(FIRST);
    LAST = LOWCASE(LAST);
SUBSTR(FIRST,1,1) = UPCASE(SUBSTR(FIRST,1,1));
SUBSTR(LAST,1,1) = UPCASE(SUBSTR(LAST,1,1));
DATALINES;
ronaldcODy
THomaSeDISON
alberteinstein
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Dec 2017 15:21:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424042#M104355</guid>
      <dc:creator>rvsidhu035</dc:creator>
      <dc:date>2017-12-29T15:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: what is the ouptput for this sas code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424043#M104356</link>
      <description>&lt;P&gt;Why not just run it and see for yourself?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 15:41:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424043#M104356</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-29T15:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: what is the ouptput for this sas code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424048#M104357</link>
      <description>&lt;P&gt;I agree with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16777"&gt;@WarrenKuhfeld&lt;/a&gt;&amp;nbsp;however, before running the code, suggest that you add a space between first and last names as shown in the example from Ron's book:&lt;/P&gt;
&lt;PRE&gt;DATA CAPITALIZE;
INFORMAT FIRST LAST $30.;
INPUT FIRST $ LAST $;
    FIRST = LOWCASE(FIRST);
    LAST = LOWCASE(LAST);
SUBSTR(FIRST,1,1) = UPCASE(SUBSTR(FIRST,1,1));
SUBSTR(LAST,1,1) = UPCASE(SUBSTR(LAST,1,1));
DATALINES;
ronald cODy
THomaS eDISON
albert einstein
;
run;&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 15:58:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424048#M104357</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-12-29T15:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: what is the ouptput for this sas code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424054#M104358</link>
      <description>&lt;P&gt;my doubts here:&lt;/P&gt;&lt;P&gt;1.number of variables are four or two&lt;/P&gt;&lt;P&gt;2.i am get first,last,r,t&lt;/P&gt;&lt;P&gt;3.we get four variable and theri answer like this==first(ronaldcody),last(thomasedison),r=R,t=T&lt;/P&gt;&lt;P&gt;4.but i get only two variable FIRST=Ronaldcodv, LAST=Thomasedison&lt;/P&gt;&lt;P&gt;5.i want explain for this&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA CAPITALIZE;
INFORMAT FIRST LAST $30.;
INPUT FIRST $ LAST $;
    FIRST = LOWCASE(FIRST);
    LAST = LOWCASE(LAST);
SUBSTR(FIRST,1,1) = UPCASE(SUBSTR(FIRST,1,1));
SUBSTR(LAST,1,1) = UPCASE(SUBSTR(LAST,1,1));
DATALINES;
ronaldcODy
THomaSeDISON
alberteinstein
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Dec 2017 16:20:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424054#M104358</guid>
      <dc:creator>rvsidhu035</dc:creator>
      <dc:date>2017-12-29T16:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: what is the ouptput for this sas code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424057#M104359</link>
      <description>&lt;P&gt;This code does not create variable R and T.&amp;nbsp; You must be referring to some other program. SAS goes to a new line when it does not find Last on the same line as First.&amp;nbsp; This works fine in the first pass but not in the second pass where you get a lost card error.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 16:30:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424057#M104359</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-29T16:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: what is the ouptput for this sas code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424059#M104360</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA CAPITALIZE;
INFORMAT FIRST LAST $30.;
INPUT FIRST $ LAST $;
    FIRST = LOWCASE(FIRST);
    LAST = LOWCASE(LAST);
SUBSTR(FIRST,1,1) = UPCASE(SUBSTR(FIRST,1,1));
SUBSTR(LAST,1,1) = UPCASE(SUBSTR(LAST,1,1));
DATALINES;
ronaldcODy THomaSeDISON
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I AM CONFUSE OUTPUT OF THIS PROGRAM&lt;/P&gt;&lt;P&gt;FIRST=Ronalddcody, LAST=Thomasedison&lt;/P&gt;&lt;P&gt;kindly explain&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 16:47:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424059#M104360</guid>
      <dc:creator>rvsidhu035</dc:creator>
      <dc:date>2017-12-29T16:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: what is the ouptput for this sas code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424061#M104362</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;pointed out, you left out the blanks. SAS reads the first line as the first name then the second line as the last name.&amp;nbsp; The code capitalizes the first letter of each and lowercases the rest.&amp;nbsp; Then SAS tries again and ends since it cannot find a last name (as I mentioned before).&amp;nbsp; SAS continues to the next line when it can't find all the input on the current line.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 16:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424061#M104362</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-29T16:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: what is the ouptput for this sas code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424062#M104363</link>
      <description>&lt;P&gt;Just follow the code you submitted in your most recent example.&lt;/P&gt;
&lt;PRE&gt;DATA CAPITALIZE;
INFORMAT FIRST LAST $30.;
INPUT FIRST $ LAST $;
    FIRST = LOWCASE(FIRST);
    LAST = LOWCASE(LAST);
SUBSTR(FIRST,1,1) = UPCASE(SUBSTR(FIRST,1,1));
SUBSTR(LAST,1,1) = UPCASE(SUBSTR(LAST,1,1));
DATALINES;
ronaldcODy THomaSeDISON
;
run;&lt;/PRE&gt;
&lt;P&gt;You're reading one record that has two strings:&lt;/P&gt;
&lt;PRE&gt;first=ronaldcODy 
and
last=THomaSeDISON&lt;/PRE&gt;
&lt;P&gt;You're then making all of the letters, of both, to be lower case. i.e.,&lt;/P&gt;
&lt;PRE&gt;ronaldcody
and
thomasedison&lt;/PRE&gt;
&lt;P&gt;You're then make the first letter, of each, to be uppercase:&lt;/P&gt;
&lt;PRE&gt;Ronaldcody
and
Thomasedison&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 17:00:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-ouptput-for-this-sas-code/m-p/424062#M104363</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-12-29T17:00:04Z</dc:date>
    </item>
  </channel>
</rss>

