Congratulations on attempting to read the values with a data step.
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.
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
Or a more sophisticated example using a custom informat and matching format:
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;
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.
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.
If you 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.
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.
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.