BookmarkSubscribeRSS Feed
JanZ
Calcite | Level 5

Hello,

Could anyone help me please? I try to build Extension (customized) node in EM. I downloaded xml template that calls initial macro from source entry in catalog (sashelp.xxx.xxx.source). If I follow the guides on internet with %macro option /store source, macro is saved as .macro entry type and not .source. Do you have any idea if it's due to some ods or other settings? If there is a workaround that xml could read initial macro from .macro entry type, that would work as well. So far the new node doesn't see the code under .macro. It's in correct folder, sashelp can see it (c:\Program Files\SASHome\SASFoundation\9.4\nls\en\SASCFG\).

(SAS EG6.1 64bit, EM 13.1 64bit)

 

Thank you in advance Smiley Happy

 

my code:

 

option mstored sasmstore=mymac;
libname mymac 'c:\moje\mysas\';

%macro hello() / store source;
data _null_;
put "Hello, World!";
run;
%mend hello;

 

check:

proc catalog catalog=mymac.sasmacr; contents out=b;run;*works and shows type as macro;

%copy hello/source;*works and shows code in log;

 

part of xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Component PUBLIC "-//SAS//EnterpriseMiner DTD Components 1.3//EN" "Components.dtd">
<Component type="AF" resource="com.sas.analytics.eminer.visuals.PropertyBundle" serverclass="EM6" name="hello" displayName="Hello_World" description="Say Hello World" group="New" icon="pic.gif" prefix="HW" >
<PropertyDescriptors>
<Property type="String" name="Location" initial="CATALOG" />
<Property type="String" name="Catalog" initial="SASHELP.sasmacr.hello.MACRO" />
...

 

2 REPLIES 2
WendyCzika
SAS Employee

I think you still need to create a catalog that contains a .source file as your entry point file, though from there you can point to regular macro files, not source files inside of a catalog.  The following is from page 10 of  http://support.sas.com/documentation/cdl/en/emxndg/67980/PDF/default/emxndg.pdf:

 

To store your code in external files rather than in a SAS catalog, simply alter the FILENAME statements accordingly. However, you must store the entry point file (for example, example.source) in a catalog and place it in a SAS library that is accessible by Enterprise Miner. The simplest way to do this is to include your catalog in the Sashelp library by placing the catalog in the SASCFG folder. The exact location of this folder depends on your operating system and your installation configuration, but it is always found under the root SAS directory and has a path resembling ...\SAS \SASFoundation\9.2\nls\en\SASCFG. For example, on a typical Windows installation, the path is C:\Program Files\SAS\SASFoundation\9.2\nls\en \SASCFG

JanZ
Calcite | Level 5

Thank you, Wendy, for the confiramtion that I have to create .source type in catalog at least for initial macro. That means that no workaround is available here and I have to focus on the point where I got stuck. 

 

The problem is that if I submit the following code, .macro type is saved in catalog instead of .source type. I wish to create the .source type instead, but I don't know how.

 

option mstored sasmstore=mymac;
libname mymac 'c:\moje\mysas\';

 

%macro hello() / store source;
data _null_;
put "Hello, World!";
run;
%mend hello;

 

Thank you again : )

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 947 views
  • 1 like
  • 2 in conversation