BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Kc2
Quartz | Level 8 Kc2
Quartz | Level 8

Hello,

 

I am saving the log and lst files of my program but when  I open the saved files the content is cut. In SAS windows when running the program the full content.

Any idea on how to solve this?

Interactive mode

Kc2_0-1642179231462.png

Saved file

Kc2_1-1642179282064.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

If you don't want the output centered the use the NOCENTER system option.

View solution in original post

15 REPLIES 15
ballardw
Super User

How did you save the files? SAS Menu or commands, SAS Code, copy paste into some other application or something else?

 

What application are you viewing the saved LST and LOG files with?

Your application may only be showing some fixed number of columns.

Kc2
Quartz | Level 8 Kc2
Quartz | Level 8

I Use the code;

dm output "print file='Study\..\lst\dm.lst' replace";
proc printto; run;

 

and I open the saved file with Notepad.

 

Reeza
Super User
LINESIZE option. I think the default is 80 characters and I'm too lazy to count your output but that seems roughly right.

Try setting:

option linesize = max;

And re-running to see what happens.
Kc2
Quartz | Level 8 Kc2
Quartz | Level 8

The linesize option is already at max.

The issue seems to be the LST in the SAS interactive window is not left aligned

Kc2_0-1642187978637.png

 

Reeza
Super User
Your code isn't what I would expect to see.

dm output "print file='Study\..\lst\dm.lst' replace";
proc printto; run;

I would expect to see:

proc printto log='path to log file.log' print='path to lst file.lst'; run;

What happens if you use that instead of the DM command.
Kc2
Quartz | Level 8 Kc2
Quartz | Level 8
I get the same outputs. Still getting cut.
Reeza
Super User

Ran this using SAS 9.4M6. Output is attached with no truncation. 

 

options linesize=max;

proc printto log='/home/fkhurshed/Demo1/demo_log.log' print='/home/fkhurshed/Demo1/demo_listing_output.lst'; run;

data class;
set sashelp.class;
if age in (12, 13) then sex = 'F';
run;

proc compare data=class compare=sashelp.class;
run;

Can you please run the following in your system and attach the exact output that is generated? You will need to modify the paths to be correct for your system. 


@Kc2 wrote:
I get the same outputs. Still getting cut.

 

Reeza
Super User
You could also switch to using an ODS LISTING statement instead but this should work AFAIK.

ods listing file = 'path to lst file';

sas code;

ods listing close;

And then the file specified above should have your output with no issues.
Kc2
Quartz | Level 8 Kc2
Quartz | Level 8
This si the log;
[cid:161e34a5-b247-4db8-8928-adc459ec3dfe]

the lst file still shows the results right aligned instead of left
[cid:6e81b1ab-c6c0-4070-8851-170396f1b530]
Reeza
Super User
No attachments - attachments via email are not supported you need to add them in the forum.
Kc2
Quartz | Level 8 Kc2
Quartz | Level 8
I am not able to log into the community forum. It seems the site is down.
Kc2
Quartz | Level 8 Kc2
Quartz | Level 8

These are the outputs;

 

log;

Kc2_0-1642205904390.png

Lst:

Kc2_1-1642205932248.png

 

Tom
Super User Tom
Super User

If you don't want the output centered the use the NOCENTER system option.

Reeza
Super User

So the truncation issue is fixed?

And now your concern is the alignment of the text?

 

As @Tom mentioned, you can use the NOCENTER option to align to the left. 

 

option nocenter;

@Kc2 wrote:

These are the outputs;

 

log;

Kc2_0-1642205904390.png

Lst:

Kc2_1-1642205932248.png

 


 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 15 replies
  • 2122 views
  • 4 likes
  • 4 in conversation