<?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: Survey Data Analysis in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879961#M82788</link>
    <description>&lt;P&gt;Yes, it worked. Thank you so much.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 20:00:10 GMT</pubDate>
    <dc:creator>Pooja_Chhetri</dc:creator>
    <dc:date>2023-06-09T20:00:10Z</dc:date>
    <item>
      <title>Survey Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879822#M82775</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am doing my survey data analysis and I encountered one problem. I am not able to increase the cell width in SAS due to which SAS is not able to display all the information that I have in the excel file. Actually I was trying to convert Likert scale data into numeric value. As the SAS cell width is small, it can only displayed "somewhat" instead of "somewhat important" and "somewhat unimportant". Due to which I was not able to change it to numeric values. Can anyone please provide me the SAS code which help me to change cell width?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 19:59:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879822#M82775</guid>
      <dc:creator>Pooja_Chhetri</dc:creator>
      <dc:date>2023-06-08T19:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Survey Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879823#M82776</link>
      <description>&lt;P&gt;Please share the code you're using so we can help assess the problem.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 20:12:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879823#M82776</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2023-06-08T20:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Survey Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879824#M82777</link>
      <description>&lt;P&gt;This is two of the SAS CODE which I have used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc report data=survey;&lt;BR /&gt;columns Q16_1 Q16_2 Q16_3 Q16_4 Q16_5 Q16_6 Q16_7;&lt;BR /&gt;define Q16_1 / style(column)=[cellwidth=50in];&lt;BR /&gt;define Q16_2 / style(column)=[cellwidth=20in];&lt;BR /&gt;define Q16_3 / style(column)=[cellwidth=20in];&lt;BR /&gt;define Q16_4 / style(column)=[cellwidth=20in];&lt;BR /&gt;define Q16_5 / style(column)=[cellwidth=20in];&lt;BR /&gt;define Q16_6 / style(column)=[cellwidth=20in];&lt;BR /&gt;define Q16_7/ style(column)=[cellwidth=20in];&lt;BR /&gt;title "Using the CELLWIDTH= Style with PROC REPORT";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc report data = survey;&lt;BR /&gt;title 'Responses';&lt;BR /&gt;column Name Q16_1 Q16_2 Q16_3 Q16_4 Q16_5 Q16_6 Q16_7 ;&lt;BR /&gt;define Q16_1 / width = 20;&lt;BR /&gt;define Q16_2 /width = 5 ;&lt;BR /&gt;define Q16_3 /width = 5 ;&lt;BR /&gt;define Q16_4 /width = 5 ;&lt;BR /&gt;define Q16_5 / width = 5;&lt;BR /&gt;define Q16_6 / width = 5;&lt;BR /&gt;define Q16_7/ width = 5;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=survey;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 20:15:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879824#M82777</guid>
      <dc:creator>Pooja_Chhetri</dc:creator>
      <dc:date>2023-06-08T20:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Survey Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879827#M82778</link>
      <description>&lt;P&gt;I used this test code which deliberately sets the width too small for the data. I ran the code in PC SAS (9.4 M8), Enterprise Guide 8.3, and SAS Viya &lt;SPAN&gt;2022.1 LTS&lt;/SPAN&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'Test';
title2 "Using the CELLWIDTH= Style with PROC REPORT";
proc report data = sashelp.cars(obs=10);
columns Make Model Type;
   define Make / style(column)=[cellwidth=1in];
   define Model / style(column)=[cellwidth=1in];
   define Type / style(column)=[cellwidth=1in];
run;

title 'Test';
title2 "Using the WIDTH= option with PROC REPORT";
proc report data = sashelp.cars(obs=10) ;
	columns Make Model Type;
	define Make / width =1;
	define Model /width =1;
	define Type /width =1;
run;
title;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;They all produced the same results, and none of the data was truncate&lt;STRONG&gt;d:&lt;/STRONG&gt;&lt;/P&gt;
&lt;SECTION data-name="Report" data-sec-type="proc"&gt;
&lt;DIV id="IDX" class="systitleandfootercontainer"&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="c systemtitle"&gt;Test&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="c systemtitle2"&gt;Using the CELLWIDTH= Style with PROC REPORT&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;SECTION&gt;
&lt;ARTICLE aria-label="Table 1"&gt;
&lt;TABLE class="table undefined" aria-label="Detailed and/or summarized report"&gt;&lt;CAPTION aria-label="Detailed and/or summarized report"&gt;&amp;nbsp;&lt;/CAPTION&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col" width="53.3333px"&gt;&lt;STRONG&gt;Make&lt;/STRONG&gt;&lt;/TH&gt;
&lt;TH class="c header" scope="col" width="185.99px"&gt;&lt;STRONG&gt;Model&lt;/STRONG&gt;&lt;/TH&gt;
&lt;TH class="c header" scope="col" width="58.3594px"&gt;&lt;STRONG&gt;Type&lt;/STRONG&gt;&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="53.3333px" class="data"&gt;&lt;STRONG&gt;Acura&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="185.99px" class="data"&gt;&lt;STRONG&gt;MDX&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="58.3594px" class="data"&gt;&lt;STRONG&gt;SUV&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="53.3333px" class="data"&gt;&lt;STRONG&gt;Acura&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="185.99px" class="data"&gt;&lt;STRONG&gt;RSX Type S 2dr&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="58.3594px" class="data"&gt;&lt;STRONG&gt;Sedan&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="53.3333px" class="data"&gt;&lt;STRONG&gt;Acura&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="185.99px" class="data"&gt;&lt;STRONG&gt;TSX 4dr&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="58.3594px" class="data"&gt;&lt;STRONG&gt;Sedan&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="53.3333px" class="data"&gt;&lt;STRONG&gt;Acura&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="185.99px" class="data"&gt;&lt;STRONG&gt;TL 4dr&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="58.3594px" class="data"&gt;&lt;STRONG&gt;Sedan&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="53.3333px" class="data"&gt;&lt;STRONG&gt;Acura&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="185.99px" class="data"&gt;&lt;STRONG&gt;3.5 RL 4dr&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="58.3594px" class="data"&gt;&lt;STRONG&gt;Sedan&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="53.3333px" class="data"&gt;&lt;STRONG&gt;Acura&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="185.99px" class="data"&gt;&lt;STRONG&gt;3.5 RL w/Navigation 4dr&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="58.3594px" class="data"&gt;&lt;STRONG&gt;Sedan&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="53.3333px" class="data"&gt;&lt;STRONG&gt;Acura&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="185.99px" class="data"&gt;&lt;STRONG&gt;NSX coupe 2dr manual S&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="58.3594px" class="data"&gt;&lt;STRONG&gt;Sports&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="53.3333px" class="data"&gt;&lt;STRONG&gt;Audi&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="185.99px" class="data"&gt;&lt;STRONG&gt;A4 1.8T 4dr&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="58.3594px" class="data"&gt;&lt;STRONG&gt;Sedan&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="53.3333px" class="data"&gt;&lt;STRONG&gt;Audi&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="185.99px" class="data"&gt;&lt;STRONG&gt;A41.8T convertible 2dr&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="58.3594px" class="data"&gt;&lt;STRONG&gt;Sedan&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="53.3333px" class="data"&gt;&lt;STRONG&gt;Audi&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="185.99px" class="data"&gt;&lt;STRONG&gt;A4 3.0 4dr&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="58.3594px" class="data"&gt;&lt;STRONG&gt;Sedan&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/ARTICLE&gt;
&lt;/SECTION&gt;
&lt;/SECTION&gt;
&lt;SECTION data-name="Report" data-sec-type="proc"&gt;&lt;HR /&gt;
&lt;DIV id="IDX1" class="systitleandfootercontainer"&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="c systemtitle"&gt;Test&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="c systemtitle2"&gt;Using the WIDTH= option with PROC REPORT&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;SECTION&gt;
&lt;ARTICLE aria-label="Table 1"&gt;
&lt;TABLE class="table undefined" aria-label="Detailed and/or summarized report"&gt;&lt;CAPTION aria-label="Detailed and/or summarized report"&gt;&amp;nbsp;&lt;/CAPTION&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;Make&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;Model&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;Type&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="data"&gt;Acura&lt;/TD&gt;
&lt;TD class="data"&gt;MDX&lt;/TD&gt;
&lt;TD class="data"&gt;SUV&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="data"&gt;Acura&lt;/TD&gt;
&lt;TD class="data"&gt;RSX Type S 2dr&lt;/TD&gt;
&lt;TD class="data"&gt;Sedan&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="data"&gt;Acura&lt;/TD&gt;
&lt;TD class="data"&gt;TSX 4dr&lt;/TD&gt;
&lt;TD class="data"&gt;Sedan&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="data"&gt;Acura&lt;/TD&gt;
&lt;TD class="data"&gt;TL 4dr&lt;/TD&gt;
&lt;TD class="data"&gt;Sedan&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="data"&gt;Acura&lt;/TD&gt;
&lt;TD class="data"&gt;3.5 RL 4dr&lt;/TD&gt;
&lt;TD class="data"&gt;Sedan&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="data"&gt;Acura&lt;/TD&gt;
&lt;TD class="data"&gt;3.5 RL w/Navigation 4dr&lt;/TD&gt;
&lt;TD class="data"&gt;Sedan&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="data"&gt;Acura&lt;/TD&gt;
&lt;TD class="data"&gt;NSX coupe 2dr manual S&lt;/TD&gt;
&lt;TD class="data"&gt;Sports&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="data"&gt;Audi&lt;/TD&gt;
&lt;TD class="data"&gt;A4 1.8T 4dr&lt;/TD&gt;
&lt;TD class="data"&gt;Sedan&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="data"&gt;Audi&lt;/TD&gt;
&lt;TD class="data"&gt;A41.8T convertible 2dr&lt;/TD&gt;
&lt;TD class="data"&gt;Sedan&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="data"&gt;Audi&lt;/TD&gt;
&lt;TD class="data"&gt;A4 3.0 4dr&lt;/TD&gt;
&lt;TD class="data"&gt;Sedan&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;Do you get these same results using the test code? If so, what's different with your original output?&lt;/P&gt;
&lt;/ARTICLE&gt;
&lt;/SECTION&gt;
&lt;/SECTION&gt;</description>
      <pubDate>Thu, 08 Jun 2023 20:57:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879827#M82778</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2023-06-08T20:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Survey Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879828#M82779</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Thank you for the reply.&amp;nbsp; Now I am able to increase the width of cell but the actual problem is:&lt;FONT face="inherit"&gt;&amp;nbsp;In my excel file, there are options like very important, somewhat important, neither, somewhat unimportant and very unimportant but when &lt;/FONT&gt;I&lt;FONT face="inherit"&gt;&amp;nbsp;print this data in SAS, it is only displaying very imp instead of very important, and &lt;/FONT&gt;somewhat for both&lt;FONT face="inherit"&gt;&amp;nbsp;somewhat important and somewhat unimportant. Due to which I was not able to convert the characters into numeric values. How can this issue be fixed?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Jun 2023 21:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879828#M82779</guid>
      <dc:creator>Pooja_Chhetri</dc:creator>
      <dc:date>2023-06-08T21:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Survey Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879829#M82780</link>
      <description>&lt;P&gt;First we need a workable description of your data. Listing a few values doesn't do it as how you read the data into SAS is critical.&lt;/P&gt;
&lt;P&gt;So first thing: Run Proc contents on your data set and share the result. If you aren't familiar with that procedure the basic results are extremely easy:&lt;/P&gt;
&lt;PRE&gt;Proc contents data=yourdatasetname;
run;&lt;/PRE&gt;
&lt;P&gt;The data set name will require the library as well if not in the work library.&lt;/P&gt;
&lt;P&gt;This will tell is the defined characteristics of the variables. It is not impossible that value was truncated when the data was read into SAS. So if we see Length such as 8 for the variable it can only hold 8 characters and indicates the data was read incorrectly to hold a value like "somewhat important". Second the details will show us the assigned format. We have people complain about the values being "incorrect" when it turns out that they somehow assigned a display format of $5 which means that only 5 characters are shown by default in output even if the variable contains 25 or 5,000.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you read data from a text file you can use a custom Informat to read the values directly into a numeric value and use a custom format to display the text value when needed.&amp;nbsp; If you search this format you will find that issues related to "reading" or "importing" data from Excel is about the single most frequent topic because there are so many ways that people can make spreadsheets and most of them are not intended for data interchange and require anywhere from a little to a great deal of intervention to make SAS data sets. Spreadsheets coupled with Proc Import are a common cause of short assigned variable lengths. Proc Import by default only uses 20 rows of data to guess the properties of a column to make into a SAS variable. So if the first 20 rows of data only have a value like "agree" then the length would be set to 5 characters so all the "somewhat agree" encountered later in the the file are truncated to "somew". There a many variations on this. A column that should be numeric but has some values recorded as "Missing" "NA" "&amp;lt; 5" may end up as character when those not-actually-a-number value are encountered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, if you have two or more spreadsheet files what are supposed to contain similar data, when using Proc Import to read the data each file is treated separately and can result in variables having different lengths, different types and even different names depending on the files.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 21:02:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879829#M82780</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-06-08T21:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Survey Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879832#M82781</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pooja_Chhetri_0-1686259702152.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84837i2F9AE6EB56B33A2B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pooja_Chhetri_0-1686259702152.png" alt="Pooja_Chhetri_0-1686259702152.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the result I get by running proc contents. Please let me know if you need any more information. I used this code to import the excel file in SAS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;data survey; **select a name;&lt;BR /&gt;infile 'C:\Users\chhetrip\Downloads\Logging\Responses.csv' DLM=',' DSD MISSOVER firstobs=2; *tell where to find data;&lt;BR /&gt;input Q2 $ Q3_1_1 $ Q3_2_1 $ Q3_3_1 Q4 Q5 Q6 $ Q7_1_1 Q7_2_1 Q7_3_1 Q7_4_TEXT $ Q7_4_1 Q8 $ Q9 Q10_1_1 Q10_2_1 Q10_3_1 Q10_4_1 Q11_1_1 Q11_2_1 Q11_3_1 Q11_4_1 Q12_1_1 Q12_2_1 Q12_3_1 Q12_4_1 Q12_5_TEXT $ Q12_5_1 Q13_1 Q13_2 Q14_1_1 Q14_1_2 Q14_2_1 Q14_2_2 Q14_3_1 Q14_3_2 Q14_4_1 Q14_4_2 Q14_5_1 Q14_5_2 Q14_6_1 Q14_6_2 Q14_7_TEXT $ Q14_7_1 Q14_7_2 Q15_1 Q15_2 Q15_3 Q15_4 Q15_4_TEXT $ Q16_1 $ Q16_2 $ Q16_3 $ Q16_4 $ Q16_5 $ Q16_6 $ Q16_7 $ Q16_7_TEXT $ Q17_1 Q17_2 Q18_1 Q18_2 Q18_3 Q18_4 Q18_5 Q19 $ Q20 $ Q21 $ Q22 Q23 $ Q24 $ Q25 $ Q26 $;&lt;BR /&gt;run;&lt;BR /&gt;proc contents data= survey;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 21:29:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879832#M82781</guid>
      <dc:creator>Pooja_Chhetri</dc:creator>
      <dc:date>2023-06-08T21:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Survey Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879833#M82782</link>
      <description>&lt;P&gt;Congratulations on attempting to read the values with a data step.&lt;/P&gt;
&lt;P&gt;However you allowed the default $ input to be used with all of your character variables. So none of them are reading more than 8 characters.&lt;/P&gt;
&lt;P&gt;Without having your data I would change all of those of $ to :$20. if you want to read up to 20 characters. If another length makes sense use that instead of 20&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or a more sophisticated example using a custom informat and matching format:&lt;/P&gt;
&lt;PRE&gt;Proc format;
invalue lickert (upcase)
'DISAGREE'                 =1
'SOMEWHAT DISAGREE'        =2
'NEITHER AGREE OR DISAGREE'=3
'SOMEWHAT AGREE'           =4
'AGREE'                    =5
;
value lickert
1='Disagree'                 
2='Somewhat Disagree'        
3='Neither Agree or Disagree'
4='Somewhat Agree'           
5='Agree'    
;
run;

data example;
   infile datalines dlm=',';
   input respondent Q :Lickert.;
datalines;
1,disagree
2,Disagree
3,Agree
4,Agree
5,Somewhat Disagree
6,somewhat agree
7,neither agree or disagree
;

Proc freq data=example;
   tables q;
   format q lickert.;
run;

&lt;/PRE&gt;
&lt;P&gt;The Invalue in Proc format is to read text into a standard value, in this case a 5 point numeric scale. Note that the (UPCASE) option means compare an upper case version of the text to list before assigning the numeric value. This can help if people are entering data and aren't good about the case of spelling. Or if you have different pieces of software collecting data on what collected the values as "Agree", another as 'AGREE' and another as 'agree'. Actually it will handle stuff like 'aGrEE' as well.&lt;/P&gt;
&lt;P&gt;Then there is a corresponding display format to show 'nice' text when needed for the raw scale values. This approach of a numeric value with a format means that you can display values in numeric order and not fight with the order of character values where the order would tend to be 'Agree' 'Disagree' 'Neither' 'Somewhat agree' 'Somewhat disagree'. So desired order can be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you&amp;nbsp; have different text but want to map to same numbers you can overload the list such as combining "Disagree" "Worst" "Lowest" by separating the values with a comma, or separate assignments in the Invalue block. You would want to have different display formats though.&lt;/P&gt;
&lt;P&gt;Names of the Informat or Format created cannot end in a digit as ending digits are used for lengths. So if you want to have a different Informat or Format for Q2 you would want to use a name like Q2_ on the Invalue or Value statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suggestion: In the step that you read your data add a block of LABEL assignments with the text, or a reasonable paraphrase, of the question involved. Then the data set will sort of document itself plus many procedures will use the label by default if there is one assigned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 21:59:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879833#M82782</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-06-08T21:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Survey Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879836#M82783</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pooja_Chhetri_0-1686262989709.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84838i7B9B1041EEC7385C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pooja_Chhetri_0-1686262989709.png" alt="Pooja_Chhetri_0-1686262989709.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pooja_Chhetri_1-1686263020688.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84839iF436B38BDDD444BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pooja_Chhetri_1-1686263020688.png" alt="Pooja_Chhetri_1-1686263020688.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When I change $ to $ 20, you can see in the 1st picture what I get and that was not what I was looking for. As for the suggestion, I have rename all the variable after importing the data. Then when I start changing the Likert scale data into numeric value that's when the problem starts.&amp;nbsp; After some trial, I then realized it is because SAS is not displaying every information (characters) excel contains (figure 2) .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I am new to SAS programming, I did not understand how to apply that sophisticated code to my data analysis to get the desired results. Hope to get more helps in this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 22:29:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879836#M82783</guid>
      <dc:creator>Pooja_Chhetri</dc:creator>
      <dc:date>2023-06-08T22:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Survey Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879837#M82784</link>
      <description>&lt;P&gt;Show the LOG with the code when you read the data. Copy the code and all the notes or messages from the LOG. On the forum open a text box using the &amp;lt;/&amp;gt; icon that appears above the main message window. The paste all the text from the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is : $20. no space after the $ and end with a period to indicate that is an informat. The colon before the informat is related to where SAS starts reading the next value. When you place formats on the INPUT statement you can end up with SAS reading starting at the incorrect place and for the incorrect number of columns of text. The : modifies the input to help with some of those issues.&lt;/P&gt;
&lt;P&gt;OR separate the Informat information from the INPUT statement. Place this before the INPUT and use your previous Input statement.&lt;/P&gt;
&lt;PRE&gt;Informat Q2 Q6 Q8 Q13 Q20 Q21 &amp;lt;list all the CHAR variables&amp;gt; $20.;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 23:18:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879837#M82784</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-06-08T23:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Survey Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879961#M82788</link>
      <description>&lt;P&gt;Yes, it worked. Thank you so much.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 20:00:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Data-Analysis/m-p/879961#M82788</guid>
      <dc:creator>Pooja_Chhetri</dc:creator>
      <dc:date>2023-06-09T20:00:10Z</dc:date>
    </item>
  </channel>
</rss>

