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

Reply
Frequent Contributor
Frequent Contributor
Posts: 139

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

%a

%b

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);

...data steps...

and then

%c_dif_template (template file runs but gives autocall error )

%c_dif_dot

%c_dif_atp

...

I tried changing it to include the %include statement so now all the programs are listed as %include 'P:\c_dif_dot.sas' 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!

Lawrence


Super User
Posts: 11,343

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.

                "!sasext0\core\sasmacro"

                "!sasext0\accelmva\sasmacro"

                "!sasext0\dquality\sasmacro"

                "!sasext0\inttech\sasmacro"

                "!sasext0\access\sasmacro"

                "!sasext0\assist\sasmacro"

                "!sasext0\eis\sasmacro"

                "!sasext0\ets\sasmacro"

                "!sasext0\gis\sasmacro"

                "!sasext0\graph\sasmacro"

                "!sasext0\iml\sasmacro"

                "!sasext0\or\sasmacro"

                "!sasext0\qc\sasmacro"

                "!sasext0\share\sasmacro"

                "!sasext0\stat\sasmacro"

               )

Frequent Contributor
Frequent Contributor
Posts: 139

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

Ballardw;

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