Learning SAS? Welcome to the exclusive online community for all SAS learners.

Including Macros in SAS Studio / SAS University Edition

Reply
Occasional Contributor
Posts: 5

Including Macros in SAS Studio / SAS University Edition

Hi.

I'm trying to create a Choice-Based Conjoint Design in SAS Studio 9.4 TS1M2 running on Google Chrome. I'm following a Tutorial for creating a choice based conjoint design in SAS - DDL Wiki and I downloaded the macros package from SAS Technical Support Documents--Marketing Research. After extracting the 22 files to D:\sasmacros\, I used the command %include in SAS Studio to run all of them and this is what happened:

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

42 ;

43 %include 'D:\sasmacros\mktallo.sas';

WARNING: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/D:\sasmacros\mktallo.sas.

ERROR: Cannot open %INCLUDE file D:\sasmacros\mktallo.sas.

44 %include 'D:\sasmacros\mktbal.sas';

I would like your help guiding me on how to include this macros to the SAS Studio autocall library.

Thank you very much in advance for your attention.

Trusted Advisor
Posts: 1,141

Re: Including Macros in SAS Studio / SAS University Edition

hello,

What is happening is that SAS University Edition is a Virtual Machine. It is like a different machine than your computer. In fact, it is a Linux server, not Windows. So it is expecting to find ( on it its internal location  /opt/sasinside/SASConfig/Lev1/SASApp/ - you can see, it is not a windows-like path   ) something.

You have 2 options:

1- Put the macros on the current shared folder defined by your VM for your code.

2- Include your local location on windows 'D:\sasmacros\'   in your virtual machine configuration. Before starting your VM, you can select it with your right-button, then Settings -> Shared Folders. You will give that location and a name for the internal folder.

    Afterwards, you should be able to locate the files with a %include '/media/sf_[provided_name_of_folder]/yourcode.sas';

Occasional Contributor
Posts: 5

Re: Including Macros in SAS Studio / SAS University Edition

Thank you very much Juan.

I copied the files to "myfolders" shared by VMware Player. The macro files can be seen in the left box for Folders. I tried to run the next code:

%include '/folders/myfolders/sasmacros/mktex.sas';

%mktex(3 ** 5, n=243)

proc print data=design(obs=27); run;

I get this:

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

42 ;

43 %include '/folders/myfolders/sasmacros/mktex.sas';

17950 %mktex(3 ** 5, n=243)

ERROR: SAS/STAT, SAS/QC, and SAS/IML must be licensed to run this macro.

ERROR: The MKTEX macro ended abnormally.

NOTE: The MKTEX macro used 0.04 seconds.

17951 proc print data=design(obs=27); run;

ERROR: El archivo WORK.DESIGN.DATA no existe.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDIMIENTO PRINT used (Total process time):

  real time 0.00 segundos

  cpu time 0.01 segundos

 

17952 ;

17953 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

17963 ;

I get the same error without the first line (%include '/folders/myfolders/sasmacros/mktex.sas';). I'm not sure if the SAS University Edition cannot run this macros. I tried to %include them all at once and nothing different happened. I also shared the sasmacros folder trhough the VM and performed %include '/folders/sasmacros/mktex.sas'; and %include '/media/sasmacros/mktex.sas'; with no success.

I would like to know your suggestions.

Thanks,

Ambrosio

Super User
Super User
Posts: 6,499

Re: Including Macros in SAS Studio / SAS University Edition

Unfortunately the SAS University Edition does not include the SAS/QC module.  So those macros cannot used.

Trusted Advisor
Posts: 1,141

Re: Including Macros in SAS Studio / SAS University Edition

Hi Ambrosio,

nice to read some logs in spanish, long time I didn't see any Smiley Happy

And you solved that little issue (you chose the easy one, good). Perfect.

Unfortunately, I have no more suggestions. The messages are related to the license for SAS University Edition. I know you can run some statistical procedures and graphs on it, but I would bet that SAS U does not have full license for STAT, GRAPH and the other mentioned on the log. You can always ask SAS Support, about this question, pointing to this description:  SAS University Edition

Are you running any SAS/QC procedure?

Occasional Contributor
Posts: 5

Re: Including Macros in SAS Studio / SAS University Edition

Thank you very much Juan and Tom.

Well, I'm not familiarized with the procedures yet. I'm studying from Dr. Warren Kuhfeld's book Marketing Research Methods in SAS. I'm designing a discrete choice experiment as part of my Master's research, and I've learned that the use of a tool like SAS is essential.

I already asked SAS Support; they suggested to look for help in Communities.

I appreciate all your help.

Ambrosio

Super User
Posts: 17,784

Re: Including Macros in SAS Studio / SAS University Edition

Check with your University, you may be able to access a robust version of SAS to install on your computer at a smaller or no charge that will have the SAS/QC license included.

Ask a Question
Discussion stats
  • 6 replies
  • 2554 views
  • 7 likes
  • 4 in conversation