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.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.