BookmarkSubscribeRSS Feed
Doug
Calcite | Level 5
  1. I attempted to set linesize using the option. Regardless of what number I provide, SAS always goes back to the default value.
  2. When creating RTF tables through ODS, is there any way to keep the active window from changing when running programs interactively (Windows)?


8 REPLIES 8
ballardw
Super User

Some example code of how you are attempting to use linesize would help diagnose the issue.

jakarman
Barite | Level 11

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

---->-- ja karman --<-----
Doug
Calcite | Level 5

I'm currently using options linesize = xxx;

ballardw
Super User

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?

Doug
Calcite | Level 5

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.

ballardw
Super User

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.

jakarman
Barite | Level 11

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

---->-- ja karman --<-----
OS2Rules
Obsidian | Level 7

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-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 1482 views
  • 0 likes
  • 4 in conversation