BookmarkSubscribeRSS Feed
AsSASsin
Quartz | Level 8

Hello everyone,

 

we are using some Java (jar) with our SAS programs and it works well (after some massive debugging).

Now we have to use two different classes from two different jars in the same data step.

How can I set the classpath?

Now we are using this: options set=CLASSPATH “mypath/myjava.jar

I need to use more Jars.

To do this, do I need to set some environment variables?

The SAS system is Viya 3.4.

Any help?

3 REPLIES 3
ChrisNZ
Tourmaline | Level 20

Do it have to be the same data step?

If so, does it have to be the same thread? Maybe function dosubl() would allow you to call a different JAR file and then return the the calling environment?

 

AsSASsin
Quartz | Level 8
Hello I found the possibility to set the classpath with the Jar separated by ":".
If I use the option in a New session the datastep is executed with no problems.
If I use the sa me option in my SAS program with some macros and others classpath options called inside some Call execute it can resolve only the first Jar in the sequenze. I cannot understand why.
AsSASsin
Quartz | Level 8

I'm thinking that I can try to set the classpath with all my jars at the start of the SAS program and not in every single macro where there are the parametric datastep that use the javaobjs.
In this way I will remove every conflict in the call of the classpath.

Also I will try the dosubl function.
What do you think about this issue?

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1246 views
  • 0 likes
  • 2 in conversation