BookmarkSubscribeRSS Feed
Sasuserp89
Calcite | Level 5

Hello all,

 

I have a new project where we need to use Java program, which decrypts or encrypts the data using other tool. That Java program need to be used in SAS and create a program where any SAS programmer/analyst can use may be using macro or call that java program. End result should be a SAS program that can be used by any analyst or programmer

5 REPLIES 5
Sasuserp89
Calcite | Level 5

Hello Everyone,

 

I need help in using Java Program in SAS EG, can we call that and what plugins do we need. or any other method we would need to use Java program in SAS.

 

Thanks,

Sindhu

Reeza
Super User
FYI - Please do not post the same message multiple times. I've combined them into one and moved to the General Programming forum.
Reeza
Super User

Java code - try JavaObj.

 

https://documentation.sas.com/doc/en/lrcon/9.4/n0swy2q7eouj2fn11g1o28q57v4u.htm

 

Not sure it will work for you as it notes:

  • The Java object is designed to call Java methods from SAS. The Java object is not intended to extend the SAS library of functions. Calling PROC FCMP functions is much more efficient for fast in-process extensions to the DATA step, especially when large data sets are involved. Using the Java object to perform this type of processing with large data sets takes significantly more time.

If you have the code, is FCMP an option for implementation instead of Java?

 

Otherwise you may need to consider CALL SYSTEM or XCMD if you have that enabled.

Sasuserp89
Calcite | Level 5

Hi Reeza,

 

Thank you for your response. I have seen similar response in the web and not sure of this works either. First of all I need to know if there is any plugins required to use Java in SAS, so I would install those and proceed from there. Also, SAS EG supports using Java program or no, I am not sure. we want to explore our options and make that work.

SASKiwi
PROC Star

No "plug-ins" are required to use the SAS Java object. This object uses the private Java libraries that come as standard with SAS installations. If you want to use your own version of Java, then you would need to call it using OS-type commands using the method's mentioned by @Reeza .

 

EG connects to a SAS session where the SAS Java object is available and the ability to call OS-type commands including Java is possible.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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
  • 5 replies
  • 1430 views
  • 2 likes
  • 3 in conversation