BookmarkSubscribe
0 Kudos

Allow passing data objects from JMP to SAS

All, 
   I am learning SAS and I am geeked and super excited to leverage the interface that JMP has to SAS. 

   As I was getting to set up some testing using JMP, I realised the following: 

 

   Currently JMP allows the passing of a single variable from JMP into SAS as a macro using the SAS Submit function. However, I believe there will be a lot of benefit to allow passing of multiple variables or data objects like associative arrays into SAS. 

 

     

// Works 
ex = 1; 
SAS Submit(
			"
			 %put &ex; 
			",
			 DeclareMacros(ex),
			 GetSASLog( True )
		  ); 

// Fails 
ex = Associative Array( {"red", "blue"}, {1, 2} );
SAS Submit(
			"
			 %put &ex; 
			",
			 DeclareMacros(ex),
			 GetSASLog( True )
		  ); 

Tracking Number:

Defect ID:

2 Comments
Community Manager

This is an interesting suggestion but SAS doesn't have a macro data structure analgous to an associative array, so there's nothing to pass the associative array to.

 

You can convert almost any JMP data type to a character string using the Char() function and then use Declare Macros() to get that character string into a macro variable.

 

ex = Associative Array( {"red", "blue"}, {1, 2} );
char_ex=char(ex);
SAS Submit(
			"
			 %put &char_ex; 
			",
			 DeclareMacros(char_ex),
			 GetSASLog( True )
		  ); 
Community Manager
Status changed to: Declined

As noted above, SAS doesn't have complex data structures analgous to the structures in JSL.