Some example code of how you are attempting to use linesize would help diagnose the issue.
for 1/ agree with ballardw.
for 2/ Turn results off. SAS(R) 9.3 Output Delivery System: User's Guide, Second Edition (ODS NORESULTS)
13128 - Prevent the Results Viewer from opening automatically when generating output from ODS
I'm currently using options linesize = xxx;
Options linesize= indicates how many print columns are available in the text output window (ODS LIsting). It is limited between 64 to 256, at least in 9.2.3. Anything out of that range would be ignored.
What value are you trying to set and does it really need to be the output window? What are you trying to accomplish?
I am writing custom warnings and messages to the log but they keep wrapping to the next line. This creates problems when my programs to read the logs (checking warnings, errors, etc) only gets part of the message because it wrapped to the next line in the log.
For custom warnings or errors in a datastep it may be better to send them directly to an output set;
Something like:
data want (drop=errormsg) error (keep=errormsg);
set have;
length errormsg $ 400 ; /* or as long as you think the message needs to be*/
<misc code>
if <error condition> then do;
Errormsg = "Your custom error message";
put errormsg; /* so it can be seen in log if desired*/
outpout error;
end;
<other code>
output want;
run;
There have been several threads related to parsing log files and all of them seem to have many gyrations to get what you want.
ad 1) linesize. Is this something happening with 9.3?
This is the evolving way of leaving the monospace world.
ODS HTML has become the default. SAS(R) 9.4 Output Delivery System: User's Guide and SAS(R) 9.4 Output Delivery System: User's Guide (Introduction to the Output Delivery System).
HTML does not know linesizes and pagesizes like the old hardcopy paper experience.
The old ls/ps are still there but are getting overruled (ballardw) sometimes (datapage)
- SAS(R) 9.3 System Options: Reference, Second Edition
- 6028 - ODS RTF and ODS PDF reset LINESIZE and PAGESIZE values
Two things to try:
1) Use: ODS LISTING FILE="mvs.file.name" and then use PROC PRINT. This may bypass the pagesize/linesize limits. I would preallocate the output file with the attributes you want first.
2) Use a FILE statement and write the data with PUT statements. Files can be up to 32,767 char wide (the MVS limit last I heard - may have changed since).
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.