01-23-2014 01:19 AM
I have a dataset with variable value containing Message information. When I read the Message from the text document I am appending the values from different observations and the complete text is comming in one line.
Is there any option in sas to display the message variable in (as in Excel we use alt + enter) more than one line as in header with split option.
The requirement is the data should be only in one variable and when right clicked should be able to view in excel in userfriendly format.
Please find the example below.
Input text document::::
x y z Message: This is a sample message,
where I have to read the information in
one single variable in sas data set.
When I read this dataset the variable message comes in one line. say like the below
Message: This is a sample message, where I have to read the information in one single variable in sas data set.
But the issue here is to split the dataset value or set the column width or set the height of the variable value for display purpose or when
viewed by client in excel.
I have used byte(10) and concatenated the observations but does not work.
Thanks in advance.
01-23-2014 11:14 PM
Guys can any one please help in the above problem. Please state wether it is possible or not.
Even if I have to export to Excel the solution will be helpful (alt + enter ) format.
Thanks in advance.
01-24-2014 09:30 PM
This is a question about how long data items in a SAS dataset can be displayed in multiple lines. It is not a question of how the data is stored 'under the covers' because it makes no sense in that context, either for SAS or Excel.
I doubt whether you can make the SAS data viewer behave in the way you describe but Proc report (and tabulate) can wrap data within fixed width cells. An example from the SAS documentation:
proc format ;
1='This is an example of a description that is too long so it wraps down to the next line';
input question rater $ avg;
1 manager 3
1 staff 2
1 peer 3
ods listing close;
options nodate nonumber orientation=portrait;
proc report data=a nowd spanrows;
column question rater avg;
define question / order
define rater / display;
define avg / display;
(this comes from 9.2 documentation that describes an undesired side effect with ODS PDF:
01-27-2014 12:19 AM
your comment is helpful in finalizing my decission..
As I can clearly specify to my client that dataset cannot be viewed directly in desired format, I can give a desired output if needed (ODS, EXCEL, HTML...).