BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
MaryA_Marion
Lapis Lazuli | Level 10

How to obtain macro code for dftest and logtest (not just info on the call parameters)? I would like to extend the code. 

See https://www.lexjansen.com/nesug/nesug94/NESUG94108.pdf

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

These macros are in the sasautos subdirectory of your SASROOT.

Run this first:

%put %sysget(SASROOT);

to get the base location of your SAS installation; add /sasautos/ to that, and the name of the macro file.

This retrieves the source code of the macro on SAS On Demand:

filename maccode "/pbr/sfw/sas/940/SASFoundation/9.4/sasautos/dftest.sas";

data _null_;
infile maccode;
input;
put _infile_;
run;

View solution in original post

3 REPLIES 3
Kurt_Bremser
Super User

These macros are in the sasautos subdirectory of your SASROOT.

Run this first:

%put %sysget(SASROOT);

to get the base location of your SAS installation; add /sasautos/ to that, and the name of the macro file.

This retrieves the source code of the macro on SAS On Demand:

filename maccode "/pbr/sfw/sas/940/SASFoundation/9.4/sasautos/dftest.sas";

data _null_;
infile maccode;
input;
put _infile_;
run;
fja
Lapis Lazuli | Level 10 fja
Lapis Lazuli | Level 10

Thank you very much Kurt! 

 

This was enlightening (truely!) ... just let me remark, that SASROOT can be resolved automatically by the  filename line ... i.e. the following code also works:

filename maccode "!SASROOT/sasautos/dftest.sas"; 
 
data _null_; 
infile maccode; 
input; 
put _infile_; 
run;

 

MaryA_Marion
Lapis Lazuli | Level 10
Thank you. I am going to look into sasautos directory a bit more. MM

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1505 views
  • 3 likes
  • 3 in conversation