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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 24 replies
  • 9087 views
  • 4 likes
  • 5 in conversation