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

Using FILENAME statement in SAS University edition to connect with JMS broker

Reply
Senior User
Posts: 1

Using FILENAME statement in SAS University edition to connect with JMS broker

[ Edited ]

I have Win 10. I have my SAS on Virtual box. I have installed Activemq and i need to connect it with SAS. There are some documentetion, that is pretty ok, but i have errors(pic 1). If i correctly understand i need to meet one paticular requirement: "The JAR files for your JMS provider must be included in your CLASSPATH= environment variable."

If that is correct, i have two ways:

1) Set classpath in the linux console. You need to know login and password to use it and they were given in SAS image in advance(if its even will work - i dont shure). And even if I get access, how will I find the path to my .jar files that are located on my pc in a shared folder?

2) Somehow set it in SAS web interface.I don't know if there's a code for that but I'm thinking of the autoexec. This code doesn't end up with an error:

options set=CLASSPATH "<folder that contains JAR/CLASS files>"

But still, which path is correct?

/folders/mysharedfolder/ does not work.

I guess there's no need to run it all on University ed.(probably that's why I haven't found any clues so far), but if you have any ideas I will be grateful.


pic 1.png
Super User
Posts: 10,552

Re: Using FILENAME statement in SAS University edition to connect with JMS broker

I can't point you to a specific solution, not familiar with JMS but I believe you want to investigate the FILENAME statement.

 

The File statement in a data step does not support all of the features of a filename statement. Use the Filename to declare the reference and then in a data step use the file reference:

 

LIbname myfile engine "path to file/file" <other options such as user password the engine supports>;

 

the "path to file" options can vary depending on the engine. When using a local file system then the directory/file in the appropriate OS syntax is used. But for engines like FTP there are lots of things.

 

 

data use;

    file myfile   <and the options DATA step may use such as DLM LRECL termstr etc>;

Super User
Posts: 6,982

Re: Using FILENAME statement in SAS University edition to connect with JMS broker

Keep in mind that SAS UE runs in a virtual machine, so tcp://localhost in the SAS code points to the VM itself, and I seriously doubt that you could somehow run third-party software (the broker) in the VM that isn't already there.

I also think that there's no way to access any outside computer from the UE; the only communication paths to the outside world are the web port for SAS Studio and the shared folder.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Regular Contributor
Posts: 190

Re: Using FILENAME statement in SAS University edition to connect with JMS broker

I'm not familiar with ActiveMQ but it looks like it has a RESTful API so you might be able to get it to work with Proc HTTP which certainly works in University Edition.

 

http://activemq.apache.org/rest.html

Super User
Posts: 6,982

Re: Using FILENAME statement in SAS University edition to connect with JMS broker

PS Moved the question to the SAS Analytics U forum.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 4 replies
  • 207 views
  • 2 likes
  • 4 in conversation