BookmarkSubscribeRSS Feed
PSNn
Obsidian | Level 7

No... This should work With Your Version too.  This functionality is VERY old.

You will get a "balnk" value when running interactively  and the full pathname of the log file when running in batch mode (where there is a log file).

... I think you replied to another aswer than mine....

TRY IT!

PSNn
Obsidian | Level 7

Yes, this is batch things...   

Kurt_Bremser
Super User

@PSNn wrote:

Yes, this is batch things...   


See my other post. Tested it in workspace server, display manager and batch. Same result everywhere.

I'm considering opening a track with SAS TS. Either the documentation is incomplete, or something else is fishy.

Kurt_Bremser
Super User

Ran this:

%put %symexist(SYSPRINTTOLOG);
proc printto log='$HOME/log1.txt' new;run;
%put %symexist(SYSPRINTTOLOG);
%put &SYSPRINTTOLOG;
proc printto log='$HOME/log2.txt' new;run;
%put %symexist(SYSPRINTTOLOG);
%put &SYSPRINTTOLOG;
proc printto;run;
%put %symexist(SYSPRINTTOLOG);
%put &SYSPRINTTOLOG;
%put &=sysvlong;

And got this log in EG:

24         %put %symexist(SYSPRINTTOLOG);
0
25         proc printto log='$HOME/log1.txt' new;run;

NOTE: PROZEDUR PRINTTO used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

32         %put %symexist(SYSPRINTTOLOG);
0
33         %put &SYSPRINTTOLOG;
WARNING: Apparent symbolic reference SYSPRINTTOLOG not resolved.
&SYSPRINTTOLOG
34         %put &=sysvlong;
SYSVLONG=9.04.01M2P072314

log1.txt:

NOTE: PROZEDUR PRINTTO used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

26         %put %symexist(SYSPRINTTOLOG);
0
27         %put &SYSPRINTTOLOG;
WARNING: Apparent symbolic reference SYSPRINTTOLOG not resolved.
&SYSPRINTTOLOG
28         proc printto log='$HOME/log2.txt' new;run;

log2.txt:

NOTE: PROZEDUR PRINTTO used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

29         %put %symexist(SYSPRINTTOLOG);
0
30         %put &SYSPRINTTOLOG;
WARNING: Apparent symbolic reference SYSPRINTTOLOG not resolved.
&SYSPRINTTOLOG
31         proc printto;run;

SAS on AIX, so this might be specific to the OS.

 

Edit:

Ran the same in batch mode, identical result. Maybe there's an option that disables this?

PSNn
Obsidian | Level 7

Yes... An explanation from SAS Institute is needed..

This document:  http://support.sas.com/resources/papers/proceedings15/SAS1575-2015.pdf

is pretty old and says that this shouyld be available in both 9.3  and 9.4

Shmuel
Garnet | Level 18

I'm using SAS UE that is sas 9.4.

Ditza1
Obsidian | Level 7

Thank you so much for your help, I really appreciate it

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 24 replies
  • 6192 views
  • 4 likes
  • 5 in conversation