Running sas programs (as macros) and/or %include

Regular Contributor
Regular Contributor
Posts: 159

Running sas programs (as macros) and/or %include

Hello all;

I am not sure what is different about the new operating system/network I am in but I used to previously run one main program and then

run other programs in order such as



etc etc

However now it runs the first two and then stops-

In this case I have:

filename cdifmac 'P:\'

options recall mautosource sasautos=(cdifmac sasautos); steps...

and then

%c_dif_template (template file runs but gives autocall error )




I tried changing it to include the %include statement so now all the programs are listed as %include 'P:\' instead

with the same results.

AS the order does not matter (except for the trmplate program), I have switched them around with the same consequences. The first two will run and then stop. Or when I don't run the template (and a cple programs at the end), then the first runs and then stops.

All the programs do work and if I highlight them after, it runs w/o incident.

Any suggestions would be great!


Super User
Posts: 13,563

Re: Running sas programs (as macros) and/or %include

Are %c_dif_template etc. files actually calling a macro named %c_dif_template?

It may be that the file location(s) need to be added to autocall libraries. You didn't mention you OS so the approach may vary.

I cheat and add my autocall libaray location to the SASAUTOS line in the SAS configuration file. The code look like

/* Setup the SAS System autocall library definition */

-SET SASAUTOS  ("D:\myautocalllibrarydirectory"  <this is the line I add.

















Regular Contributor
Regular Contributor
Posts: 159

Re: Running sas programs (as macros) and/or %include


The cdif template is just a program that is creating a style template. No values are being stored anywhere.

Where is the configuration file above? I like the idea but I am only hestitant as this program may end up on a mainframe and I won't have access to that config file.

The second program c_dif_dot is actually just an PROC SQL query that returns a dataset.

All of them do that. I just do it this way for neatness.

I am using Windows XP if that helps.

Thanks for your assistance thus far.

Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation