Help using Base SAS procedures

Sas Output

Not applicable
Posts: 0

Sas Output

hi all,

im having trouble with my output. I have an output but the output is gettin truncated. I know that there is a way to change the output to get up to 200 characters but I have lines of output that are more than 200 characters. does anyone have any ideas as to how to get all of my output displayed.

thanks in advance
Super Contributor
Super Contributor
Posts: 3,176

Re: Sas Output

Posted in reply to deleted_user
If your output is going to a file, you control the record-length, if other than the SAS default. However, if your output is created with FILE PRINT, you have a max value of 255 -- coded as OPTIONS LS=255 or LS=MAX.

Scott Barry
SBBWorks, Inc.
Not applicable
Posts: 0

Re: Sas Output

but its a dataset that I am trying to create and it is printed with proc print and the length of one of the values is that possible?

Posts: 9,367

Re: Sas Output

Posted in reply to deleted_user
You will run into Linesize issue if you use the LISTING window and PROC PRINT to print your dataset. You should not have any problems -creating- a big variable but -displaying- it in the LISTING destination or OUTPUT window may be difficult, since the variable exceeds the max allowable linesize, most procedures for displaying will complain.

One option, if you want to keep your output report in the LISTING window is to investigate PROC REPORT and the FLOW option, which would allow your long variable to flow across multiple lines.

The other option and possibly simpler if you are new to SAS is to use the ODS HTML "sandwich" around your program:
ods listing close;
ods html file='somefile.html' style=sasweb;
proc print data=work.whatever;
ods html close;
ods listing;

HTML files can be as "wide" as they need to be for viewing on the screen. The above syntax would create an HTML file from the dataset WORK.WHATEVER. That HTML file can be opened in a browser that supports HTML 4.01 tags. (pretty much any browser).

Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation