Subscribe Bookmark RSS Feed

Read JMP variable value in SAS?

albert419870

Community Trekker

Joined:

Dec 24, 2015

Currently I've written some SAS codes in enterprise guide (SAS ver: 9.3), and I also want to combine functions in JMP then read out JMP variable value in SAS.

Is there any fast way to read JMP variable from SAS?

So far I think I can call JMP script to execute from SAS, then put variable in a JMP / SAS table. And finally use SAS to import the table to get the value.

But I thought it contains too much procedures and file processing...so I'm searching if other better way for it.

Also I checked JMP scripting guide "Working with SAS" chapter, however, I guess it's just mentioned about how to use SAS capability within JSL.

Please also correct me if my guess is wrong.

Thanks all for your reading!

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

I am not aware of a method where a JMP memory variable can be made available for a direct read into SAS, however, an alternative to placing a value into a JMP data table and then reading it into SAS, in JMP you could easily create a text file that contains SAS code, and then simply do a %include in SAS to populate those values.

x=32;  // hypothetical JMP value you want to transfer to SAS

save text file("C:\file.txt","%let x="||char(eval(x))||';");

then in your SAS program, just use a %include statement to include the file you just created.

Jim
2 REPLIES
Solution

I am not aware of a method where a JMP memory variable can be made available for a direct read into SAS, however, an alternative to placing a value into a JMP data table and then reading it into SAS, in JMP you could easily create a text file that contains SAS code, and then simply do a %include in SAS to populate those values.

x=32;  // hypothetical JMP value you want to transfer to SAS

save text file("C:\file.txt","%let x="||char(eval(x))||';");

then in your SAS program, just use a %include statement to include the file you just created.

Jim
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

Take a look at the DeclareMacros() option on the SAS Submit() statement.

It will automatically create a SAS macro variable with the same name and value as a JSL variable.

-Jeff

-Jeff