1

I want to call PickBasic subroutines from Java. We have existing business logic in PickBasic subroutines and we only want to call those subroutines from java.

Please let me know how this can be done?

  • Please update question with your specific MV DBMS platform: jBase? Universe? Unidata? QM? D3? Reality? mvBase? The answer will be different depending on your answer. Also, is the DBMS hosted in Windows or *nix? – TonyG Dec 16 '14 at 15:57
  • We are using Universe as our MV DBMS – user2106780 Dec 17 '14 at 09:07

1 Answers1

1

For your Universe system, connectivity from Java is most easily done with UniObjects for Java. UOJ is a free class library. Connections are not pooled unless you get a special pooling license.

Rocket Software offers classes:

http://www.rocketsoftware.com/u2-training-u2100-java-application-development-using-uniobjects

The most recent developer's guide is here:

http://docs.rocketsoftware.com/nxt/gateway.dll/RKBnew20/u2%20clients%20and%20apis/jul2014/u2clients_uniobjectsjavadevguide_vjul2014.pdf

Some FOSS examples are here:

http://www.pickwiki.com/cgi-bin/wiki.pl?JavaSource

(Based on these exchanges, I'm removing the JNI tag from the original query as this is not related to JNI. JNI is an option if you want to call from Universe out using a bridge from BASIC to Java. The question here is about inbound connectivity, and for that there's an API.)

TonyG
  • 1,432
  • 12
  • 31
  • Thanks Tony for getting me started, I managed to connect to Universe database using the UNIObjects For Java But when I try to call a subroutine i am getting the following exception **The subroutine failed to complete successfully** with Error code as 30107. – user2106780 Dec 31 '14 at 12:14
  • I suggest that this is a different question: How do I connect, versus, I connected and I have a specific issue. I'm hoping you'll accept the current answer and then open a new query for the new question. Further, I think you'd get a quick and effective answer in the U2 forum (or whatever Rocket has these days), where you might need to wait a while for a complete answer here at SO. HTH – TonyG Dec 31 '14 at 18:21
  • Hey figured that out, It was a problem with calling from Java. Initially we used to call the subroutine from Database Console, and it used to execute some supporting (mandatory) subroutines in background, which used to open some files to read the data from. Now we called those subroutines first in Java using a transaction and then called the target subroutine, and viola it works just fine. Thanks again Tony for your help. – user2106780 Jan 06 '15 at 12:04