BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
omerzeybek
Obsidian | Level 7

   Hi i have a plenty of regressors and  their transformed versions. I just wanto check cross correlations between them. However i am unable to find a proper way to do it on SAS Miner, so i am trying to import my data to SAS EG.

However i have  a problem with SAS Code Node, the  node which i try to write a copy of table containing regressors to my database library


But think i am making  a mistake on coding.


On training code section of SAS i am inserting the following code

DATA CRM.OZ_SUS_EXPORT_TRANS;

Set &EMWS1.STAT_TRAIN;

Run;

here  Crm.OZ_SUS_EXPORT_TRANS table is the table which i want to create on database

EMWS1.STAT_TRAIN is the training data exported from my latest sas miner node

when i run this code i am recevining a run time error

could you please help on what has worked worng

1 ACCEPTED SOLUTION

Accepted Solutions
SusanHaller
SAS Employee

I believe your problem is an extra "&" that should not be present in your set statement.  Your code is failing because it believes that EMWS1 is a macro that needs to be resolved, not a libname.

Try the following which should run successfully:

DATA CRM.OZ_SUS_EXPORT_TRANS;

Set EMWS1.STAT_TRAIN;

Run;

In addition, I wanted to point out the Save Data node available within EM under the Utility tab.  This node was designed to do exactly what you are trying to do via the SAS Code node and it takes the responsibility of writing the code off of the user.  This node allows you to save any of the output tables from a previous node into a predefined library.

To use the Save Data node in this example, if the CRM library has been initialized, you simply need to point to this using the SAS Library Name property within the node, set All Roles=No and specify Train=Yes under the Select Roles property.  This will automatically save a copy of the STAT_TRAIN table to your CRM library.

View solution in original post

8 REPLIES 8
mohamed_zaki
Barite | Level 11

In the the train code from code editor you have two run options: run node or run code

Try run code and attach the log.

zaki

omerzeybek
Obsidian | Level 7

Hi Mohamed

When i run the node i receive following  error log text.

Thank you very much

14393  title10;

14394  %let EMEXCEPTIONSTRING=;

14395  %let syscc = 0;

PERFORMANCE  DETAILS

15876  *------------------------------------------------------------*;

15877  * EMCODE: Generation of macros and macro variables;

15878  * To see the code generated, set the EM_DEBUG macro variable to SOURCE or _ALL_;

15879  *------------------------------------------------------------*;

15880  %let syscc = 0;

15881  %inc "/sasdata/EMiner/Pegasus_Model_V_Son/Workspaces/EMWS1/EMCODE/EMTRAINCODE.sas";

NOTE: %INCLUDE (level 1) file /sasdata/EMiner/Pegasus_Model_V_Son/Workspaces/EMWS1/EMCODE/EMTRAINCODE.sas is file /sasdata/EMiner/Pegasus_Model_V_Son/Workspaces/EMWS1/EMCODE/EMTRAINCODE.sas.

15882 +DATA EMWS1.STAT_TRAIN;

15883 +Set &CRM.OZ_PEGASUS_EXPORT_TRANS;

           -

           22

           200

WARNING: Apparent symbolic reference CRM not resolved.

ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, ;, END, INDSNAME, KEY, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.

ERROR 200-322: The symbol is not recognized and will be ignored.

15884 +Run;

14393  title10;

14394  %let EMEXCEPTIONSTRING=;

14395  %let syscc = 0;

PERFORMANCE  DETAILS

15876  *------------------------------------------------------------*;

15877  * EMCODE: Generation of macros and macro variables;

15878  * To see the code generated, set the EM_DEBUG macro variable to SOURCE or _ALL_;

15879  *------------------------------------------------------------*;

15880  %let syscc = 0;

15881  %inc "/sasdata/EMiner/Pegasus_Model_V_Son/Workspaces/EMWS1/EMCODE/EMTRAINCODE.sas";

NOTE: %INCLUDE (level 1) file /sasdata/EMiner/Pegasus_Model_V_Son/Workspaces/EMWS1/EMCODE/EMTRAINCODE.sas is file /sasdata/EMiner/Pegasus_Model_V_Son/Workspaces/EMWS1/EMCODE/EMTRAINCODE.sas.

15882 +DATA EMWS1.STAT_TRAIN;

15883 +Set &CRM.OZ_PEGASUS_EXPORT_TRANS;

           -

           22

           200

WARNING: Apparent symbolic reference CRM not resolved.

ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, ;, END, INDSNAME, KEY, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.

ERROR 200-322: The symbol is not recognized and will be ignored.

15884 +Run;

mohamed_zaki
Barite | Level 11

15882 +DATA EMWS1.STAT_TRAIN;

15883 +Set &CRM.OZ_PEGASUS_EXPORT_TRANS;

           -

           22

           200

WARNING: Apparent symbolic reference CRM not resolved.

ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, ;, END, INDSNAME, KEY, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.

ERROR 200-322: The symbol is not recognized and will be ignored.

15884 +Run;

I think you entered it wrong

It is, as you mentioned previously right ?

Message was edited by: mohamed zaki

SusanHaller
SAS Employee

I believe your problem is an extra "&" that should not be present in your set statement.  Your code is failing because it believes that EMWS1 is a macro that needs to be resolved, not a libname.

Try the following which should run successfully:

DATA CRM.OZ_SUS_EXPORT_TRANS;

Set EMWS1.STAT_TRAIN;

Run;

In addition, I wanted to point out the Save Data node available within EM under the Utility tab.  This node was designed to do exactly what you are trying to do via the SAS Code node and it takes the responsibility of writing the code off of the user.  This node allows you to save any of the output tables from a previous node into a predefined library.

To use the Save Data node in this example, if the CRM library has been initialized, you simply need to point to this using the SAS Library Name property within the node, set All Roles=No and specify Train=Yes under the Select Roles property.  This will automatically save a copy of the STAT_TRAIN table to your CRM library.

naveen_srini
Quartz | Level 8

Susanhaller's post makes complete sense as SAS understands that as &libref..datasetname, and typically the & macro trigger would be passed to the macro processor by the word scanner to look for the value to resolve to that is stored in the global symbol table and then place the resolved code in the input stack. In your case, it is apparent there is no mention of the macro variable being created at any point before. Therefore, that simple change should work unless there are other issues.

omerzeybek
Obsidian | Level 7

thank you very much . This has worked on me

CharlotteCain
Quartz | Level 8

Please mark this question as answered and if you wish give them gift of points who helped you as they deserve some appreciation.

Thanks,

Charlotte

omerzeybek
Obsidian | Level 7

sorry i didnt know that awards has a real point

i have closed the inqury with correct answer badge

Thank you for tip

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 8 replies
  • 3521 views
  • 9 likes
  • 5 in conversation