<?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: Base Sas code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Base-Sas-code/m-p/116160#M293016</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have few more question on Base SAS, Could someone help me out&amp;nbsp; or Is there anyone who is going to take Base Exam soon who wants to discuss question with me. I can send them my email-id if they want to. I will appreciate&amp;nbsp; the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1-The following SAS program is submitted:&lt;/P&gt;&lt;P&gt;data work.test;&lt;/P&gt;&lt;P&gt;Author = 'Agatha Christie';&lt;/P&gt;&lt;P&gt;First = substr(scan(author,1,' ,'),1,1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Which one of the following is the length of the variable FIRST in the output dataset?&lt;/P&gt;&lt;P&gt;A. 1&lt;/P&gt;&lt;P&gt;B. 6&lt;/P&gt;&lt;P&gt;C. 15&lt;/P&gt;&lt;P&gt;D. 200&lt;/P&gt;&lt;P&gt;For me out put of First = substr(scan(author,1,' ,'),1,1) will be A . Lenth of output(A) will be 1 but this is not true.&lt;/P&gt;&lt;P&gt;2- The following SAS program is submitted:&lt;/P&gt;&lt;P&gt;data work.accounting;&lt;/P&gt;&lt;P&gt;set work.dept1 work.dept2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;A character variable named JOBCODE is contained in both the WORK.DEPT1&lt;/P&gt;&lt;P&gt;and WORK.DEPT2 SAS data sets. The variable JOBCODE has a length of 5 in the&lt;/P&gt;&lt;P&gt;WORK.DEPT1 data set and a length of 7 in the WORK.DEPT2 data set.&lt;/P&gt;&lt;P&gt;Which one of the following is the length of the variable JOBCODE in the output&lt;/P&gt;&lt;P&gt;data set?&lt;/P&gt;&lt;P&gt;A. 5&lt;/P&gt;&lt;P&gt;B. 7&lt;/P&gt;&lt;P&gt;C. 8&lt;/P&gt;&lt;P&gt;D. 12&lt;/P&gt;&lt;P&gt;here we are concatenating two data sets so length of jobcode in final data set would be 7. Is it correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Sep 2012 20:09:58 GMT</pubDate>
    <dc:creator>poo</dc:creator>
    <dc:date>2012-09-09T20:09:58Z</dc:date>
    <item>
      <title>Base Sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Base-Sas-code/m-p/116157#M293013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: TimesNewRoman;"&gt;Could someone please explain me answer of this question? I am going for Base exam in few days.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The contents of the SAS data set named PERM.STUDENTS are listed below:&lt;/P&gt;&lt;P&gt;name age&lt;/P&gt;&lt;P&gt;Alfred 14&lt;/P&gt;&lt;P&gt;Alice13&lt;/P&gt;&lt;P&gt;Barbara 13&lt;/P&gt;&lt;P&gt;Carol 14&lt;/P&gt;&lt;P&gt;The following SAS program is submitted using the PERM.STUDENTS data set as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input:&lt;/P&gt;&lt;P&gt;Libnameperm 'SAS-date-library';&lt;/P&gt;&lt;P&gt;data students;&lt;/P&gt;&lt;P&gt;set perm.students;&lt;/P&gt;&lt;P&gt;file 'file-specification';&lt;/P&gt;&lt;P&gt;put name $15. @5 age 2.;&lt;/P&gt;&lt;P&gt;run&lt;/P&gt;&lt;P&gt;Which one of the following represents the values written to the output raw data file?&lt;/P&gt;&lt;P&gt;A. ----|----10---|----20---|----30&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: TimesNewRoman;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;Alfred 14&lt;/P&gt;&lt;P&gt;Alice 13&lt;/P&gt;&lt;P&gt;Barbara 13&lt;/P&gt;&lt;P&gt;Carol 14&lt;/P&gt;&lt;P&gt;B. ----|----10---|----20---|----30&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: TimesNewRoman;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;Alfr14&lt;/P&gt;&lt;P&gt;Alic13&lt;/P&gt;&lt;P&gt;Barb13a&lt;/P&gt;&lt;P&gt;Caro14&lt;/P&gt;&lt;P&gt;C. ----|----10---|----20---|----30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alfr14ed&lt;/P&gt;&lt;P&gt;Alic13e&lt;/P&gt;&lt;P&gt;Barb13ara&lt;/P&gt;&lt;P&gt;Caro14l&lt;/P&gt;&lt;P&gt;D. ----|----10---|----20---|----30&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: TimesNewRoman;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;Alfred 14&lt;/P&gt;&lt;P&gt;Alice 13&lt;/P&gt;&lt;P&gt;Barbara 13&lt;/P&gt;&lt;P&gt;Carol 14&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: TimesNewRoman;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: TimesNewRoman;"&gt;Poo&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2012 21:16:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Base-Sas-code/m-p/116157#M293013</guid>
      <dc:creator>poo</dc:creator>
      <dc:date>2012-09-08T21:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Base Sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Base-Sas-code/m-p/116158#M293014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Think about what the PUT statement means and how it will be processed by SAS.&amp;nbsp; Then tell us which one you think is right and why.&amp;nbsp; Also why are the other ones wrong?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff; font-size: 12pt;"&gt;put name $15. @5 age 2.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also it helps to post the results with a fixed space font like Courier .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;A. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;----|----10---|----20---|----30&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Alfred 14&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Alice 13&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Barbara 13&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Carol 14&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;B. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;----|----10---|----20---|----30&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Alfr14&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Alic13&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Barb13a&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Caro14&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;C. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;----|----10---|----20---|----30&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Alfr14ed&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Alic13e&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Barb13ara&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Caro14l&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;D. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;----|----10---|----20---|----30&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Alfred 14&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Alice 13&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Barbara 13&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Carol 14&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2012 22:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Base-Sas-code/m-p/116158#M293014</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-09-08T22:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Base Sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Base-Sas-code/m-p/116159#M293015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom Thanks for reply, I got the answer.&lt;/P&gt;&lt;P&gt;age variable has range of '2' so it is just replacing 5th and 6th place with it.&lt;/P&gt;&lt;P&gt;correct answer is B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2012 23:57:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Base-Sas-code/m-p/116159#M293015</guid>
      <dc:creator>poo</dc:creator>
      <dc:date>2012-09-08T23:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Base Sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Base-Sas-code/m-p/116160#M293016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have few more question on Base SAS, Could someone help me out&amp;nbsp; or Is there anyone who is going to take Base Exam soon who wants to discuss question with me. I can send them my email-id if they want to. I will appreciate&amp;nbsp; the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1-The following SAS program is submitted:&lt;/P&gt;&lt;P&gt;data work.test;&lt;/P&gt;&lt;P&gt;Author = 'Agatha Christie';&lt;/P&gt;&lt;P&gt;First = substr(scan(author,1,' ,'),1,1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Which one of the following is the length of the variable FIRST in the output dataset?&lt;/P&gt;&lt;P&gt;A. 1&lt;/P&gt;&lt;P&gt;B. 6&lt;/P&gt;&lt;P&gt;C. 15&lt;/P&gt;&lt;P&gt;D. 200&lt;/P&gt;&lt;P&gt;For me out put of First = substr(scan(author,1,' ,'),1,1) will be A . Lenth of output(A) will be 1 but this is not true.&lt;/P&gt;&lt;P&gt;2- The following SAS program is submitted:&lt;/P&gt;&lt;P&gt;data work.accounting;&lt;/P&gt;&lt;P&gt;set work.dept1 work.dept2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;A character variable named JOBCODE is contained in both the WORK.DEPT1&lt;/P&gt;&lt;P&gt;and WORK.DEPT2 SAS data sets. The variable JOBCODE has a length of 5 in the&lt;/P&gt;&lt;P&gt;WORK.DEPT1 data set and a length of 7 in the WORK.DEPT2 data set.&lt;/P&gt;&lt;P&gt;Which one of the following is the length of the variable JOBCODE in the output&lt;/P&gt;&lt;P&gt;data set?&lt;/P&gt;&lt;P&gt;A. 5&lt;/P&gt;&lt;P&gt;B. 7&lt;/P&gt;&lt;P&gt;C. 8&lt;/P&gt;&lt;P&gt;D. 12&lt;/P&gt;&lt;P&gt;here we are concatenating two data sets so length of jobcode in final data set would be 7. Is it correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Sep 2012 20:09:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Base-Sas-code/m-p/116160#M293016</guid>
      <dc:creator>poo</dc:creator>
      <dc:date>2012-09-09T20:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Base Sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Base-Sas-code/m-p/116162#M293018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Thanks for the Post Manish!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Sep 2012 23:33:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Base-Sas-code/m-p/116162#M293018</guid>
      <dc:creator>poo</dc:creator>
      <dc:date>2012-09-09T23:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Base Sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Base-Sas-code/m-p/116163#M293019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Question-&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #625d34; font-family: 'Verdana','sans-serif'; font-size: 8.5pt;"&gt;&lt;BR /&gt;A PROC DATATSETS is used as follows(assumption: all libraries are and datasets&lt;BR /&gt;are existing):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #625d34; font-family: 'Verdana','sans-serif'; font-size: 8.5pt;"&gt;proc datasets library=mylib details;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #625d34; font-family: 'Verdana','sans-serif'; font-size: 8.5pt;"&gt;copy out=rloc;&lt;BR /&gt;select scoredata;&lt;BR /&gt;delete tension ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Which statement below explains the operations above most correctly?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #625d34; font-family: 'Verdana','sans-serif'; font-size: 8.5pt;"&gt;a.&lt;BR /&gt;It lists all SAS data files with file size and date modified in ‘mylib’ library&lt;BR /&gt;and makes a copy of ‘scoredata’ file in ‘rloc’ library and deletes ‘tension’&lt;BR /&gt;dataset..&lt;BR /&gt;&lt;BR /&gt;b. It lists all SAS data files with file size and date modified in ‘mylib’&lt;BR /&gt;library and deletes ‘tension’ file from ‘rloc’ library.&lt;BR /&gt;&lt;BR /&gt;c. It lists all SAS data files with file size and date modified in ‘mylib’&lt;BR /&gt;library and makes a copy of ‘scoredata’ file in ‘rloc’ library and also copies&lt;BR /&gt;the ‘scoredata’ file in ‘rloc’ library.&lt;BR /&gt;&lt;BR /&gt;d. It lists all sas data files with file size and date modified in ‘mylib’&lt;BR /&gt;library and makes a copy of ‘scoredata’ file in ‘rloc’ library.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 17:09:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Base-Sas-code/m-p/116163#M293019</guid>
      <dc:creator>poo</dc:creator>
      <dc:date>2013-02-20T17:09:50Z</dc:date>
    </item>
  </channel>
</rss>

