BookmarkSubscribeRSS Feed
jsbyxws
Obsidian | Level 7

I am working in SAS LSAF (Life Science Analytics Forum) environment. I found &sysinfo after proc compare did not work since its value is always 0. I tried this simple example:

data a;

  a=1;

run;

data b;

  a=2;

run;

proc compare base=a comp=b;

run;

%put &sysinfo;

Can you help?

2 REPLIES 2
ballardw
Super User

I suggest that you show us the LOG from running your code. Include the log of the two data steps, Proc compare and the  output of the %put statement. Copy the code and all the messages from the log then on the forum open a text box using the </> icon that appears above the message window and paste the text.

 

When I run your code this is my log:

52   data a;
53     a=1;
54   run;

NOTE: The data set WORK.A has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds


55
56   data b;
57     a=2;
58   run;

NOTE: The data set WORK.B has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds


59
60   proc compare base=a comp=b;
61   run;

NOTE: There were 1 observations read from the data set WORK.A.
NOTE: There were 1 observations read from the data set WORK.B.
NOTE: PROCEDURE COMPARE used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


62
63   %put &sysinfo;
4096

So I am getting 4096 for Sysinfo.

 

Note, it is a good idea on this forum to always paste example code that will run into a text box. The main message window on this forum will reformat pasted text and can result in data steps that won't run because of those changes.

jsbyxws
Obsidian | Level 7

Thanks a lot for reply! 

 

Just tried again and found the exact result as you had &sysinfo is 4096. Maybe something else happened before which I did not know.

 

Thanks again for advice about pasting original code and result. Below was the one I just tried.

 

249 data a; a=1; run;

NOTE: The data set WORK.A has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

250 data b; a=2; run;

NOTE: The data set WORK.B has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

251 proc compare base=a comp=b;
252 run;

NOTE: There were 1 observations read from the data set WORK.A.
NOTE: There were 1 observations read from the data set WORK.B.
NOTE: The PROCEDURE COMPARE printed pages 7-8.
NOTE: PROCEDURE COMPARE used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

253 /* options mprint; */
254 %put &sysinfo;
4096

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 2 replies
  • 467 views
  • 0 likes
  • 2 in conversation