Hi Cynthia,
I tried your listing program. Am still not able to see the changes done by FLOW and WIDTH options.. Am i missing out anything here? BTW am not trying ODS outputs. Your suggestions would help me a lot. Thanks.
Below is the program i tried:
options linesize=180;
data learn.lengthy_text;
charvar = 'ABCDEFGHIJKLMNOPQRSTUVWYXYZ';
charvar2 = 'ABCDEFGHIJKLMNOPQRSTUVWYXYZabcdefghijklmnopqrstuvwxyz';
charvar3 = 'ABCDEFGHIJKLMNOPQRSTUVWYXYZ';
charvar4 = 'ABCDEFGHIJKLMNOPQRSTUVWYXYZabcdefghijklmnopqrstuvwxyz';
output;
run;
proc report data = learn.lengthy_text;
define charvar / flow width = 10 'Label....x';
run;
Hi:
It's not a good idea to bury your new comment in a 9 year old posting. I almost didn't see it. What might work better is to make a new posting and just give a link to the older posting. In order to see the changes for the FLOW and WIDTH options, you have to make some changes in the original program I posted. For example, if I leave FLOW off of the DEFINE statement for CHARVAR2 and CHARVAR4, then you see this:
On the other hand, if I change the value for WIDTH=, then you see THIS:
I believe that if you change the values of WIDTH and then change having FLOW or not, you'll see the difference. But I really think you need to run the original program, as I posted it and make your changes to THAT program. You can't see the difference using only 1 variable on the report.
Hope this helps,
Cynthia
Thanks for helping me out and yes I agree, I didn't notice the post's date 🙂 Will pay more attention next time before posting.
Coming to the problem, I tried your original program and did try the flow option and width option separately. Still am not able to see the changes. I am using SAS University edition for learning purpose. Will that be a problem?
This is the listing i keep getting,
Hi:
Yes, of course that's the reason. FLOW and WIDTH are LISTING-only options. When you use SAS University Edition, the default output is ODS HTML output -- that IS using ODS. You said in your original post that you were NOT interested in ODS, so I thought you had turned LISTING output ON.
If you notice, your output, from SAS University Edition has colors and fonts being used; on the other hand, my output appears without any fancy colors or interior table lines and is in a "fixed pitch" font. That shows you how ODS destinations completely IGNORE options like FLOW and WIDTH that are LISTING-only options.
It would have been helpful to mention that you were using University Edition in your original post. If you did, I must have missed it. However, SAS University Edition does not automatically create ODS LISTING results, since there is not any LISTING window for viewing ASCII text output. You'd have to change the code to see the results by explicitly saving the LISTING output to a file and then opening the file.
However, why did you say you did not want to know about ODS output if you really ARE generating ODS HTML output from SAS University Edition? If FLOW and WIDTH are ignored by ODS when you run PROC REPORT code and if you want to keep getting the default output from SAS University Edition, then you should NOT use FLOW and WIDTH, the default destination for SAS University Edition does NOT use those options, as you have proved with a comparison of your screen shot to my screen shot. My screen shot is of the LISTING output and shows how FLOW and WIDTH are used, but ONLY by the LISTING destination. Your screen shot, is of ODS HTML output and shows that FLOW and WIDTH are ignored.
If you want to see the output, you'll have to explicitly use the ODS LISTING statement with a FILE= options, writing to /folders/myfolders, as shown below:
ods listing file='/folders/myfolders/LISTING_showout.txt';
proc report data = lengthy_text;
title 'Proc Report -- WIDTH affects LABEL and VALUE';
title2 'Note difference in display of values with FLOW ';
title3 'But specifying different WIDTH values';
column charvar charvar2 charvar3 charvar4;
define charvar / flow width=8 'Label....x';
define charvar2 / flow width=16 'Label....x';
define charvar3 / flow width=10 'Label....x';
define charvar4 / flow width=20 'Label....x';
run;
Then, after you created the LISTING_showout.txt file -- you'll have to find it in your FILES and Folders list and open it. SAS Studio will NOT open it for you automatically.
Hope this explains the difference.
Cynthia
Thanks Cynthia. Yes now am able to see the differences. I haven't clearly understood the difference between Listing and ODS outputs. That explains everything.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.