Hi,
I am not able to find out why in the last variable i am getting data as 'q' only.I expect to get 'qw'.
mk jk as rd as
aa bb cc dd ee
re te sf er qw
;
run;
It is only the size of the font that is keeping the value from showing in your first example. E.g., if you were to put the record that has the qw for x5 in the first position, that is the one that would only show 1 character.
DATA xyz;
INPUT (x1 - x5) ($2.);
DATALINES;
aabbccddqw
mkjkasrdas
aabbccddee
retesferee
;
run;
In your second example you used a default of 8 characters in the format .. more than enough to show the two characters regardless of which two they were.
Run a PROC PRINT on your data and you will find that the data is just fine. Your SAS Viewer XF column is just not wide enough to show all of the text. You can re-size the column by dragging the right boundary of the X5 column header over to the right, and you'll see the rest of your text.
Hi SAS jedi ,
Two Questions:
1. If SAS viewer column is not wide enough then it should not show the all the records on variable X5.Also when i use this dataset i am able to get the record with condition if X5='q'.
2. How it showing good in my secod data step when i am entering the data with blank as delimiter.
Regards,
Manoj
It is only the size of the font that is keeping the value from showing in your first example. E.g., if you were to put the record that has the qw for x5 in the first position, that is the one that would only show 1 character.
DATA xyz;
INPUT (x1 - x5) ($2.);
DATALINES;
aabbccddqw
mkjkasrdas
aabbccddee
retesferee
;
run;
In your second example you used a default of 8 characters in the format .. more than enough to show the two characters regardless of which two they were.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.