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?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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