MVVS: MV Basic for Visual Studio

 View Only
Expand all | Collapse all

Problem Connecting to Universe DB

  • 1.  Problem Connecting to Universe DB

    Posted 08-24-2021 14:00
    Hi, I have installed MV Basic for Visual Studio Code. It's really cool. I could open a basic programs folder, but could not connect to the database, so I can't compile, or have the additional features I saw it provides when connected.

      I have followed the documentation of this Forum, downloaded the JDK 11 from the indicated link, placed its path in the MV Basic Extension configuration, and created the following .rmv/db.mvbasic.json file:

    {
    "db": {
    "host": "192.168.2.100",
    "userName": "root",
    "password": "123456",
    "account": "ALEDB",
    "dataSource": "UNIVERSE",
    "port": 31438
    },
    "includes": [
    {
    "includeFile": "BP",
    "account": "ALEDB",
    "fileName": "BP"
    }
    ]
    }

      First of all, whenever I open a Universe Basic, the following message appears in VS Code:

    Java 11 or Open JDK runtime environment is abnormal. Please check your Java environment and settings

      Second, when doing F1 -> Connect to MV Server, another messages tells me "Connect to U2 server failed"

      Any ideas?

      Regards,

    ------------------------------
    Enrique Murphy
    Software Engineer
    Aleator SRL
    Buenos Aires Argentina
    ------------------------------


  • 2.  RE: Problem Connecting to Universe DB

    Posted 08-24-2021 16:20
    Advances and some more info:

      - I am trying to work from my Windows PC connecting to a Universe Linux server, so I am using VS Code in my PC, and opening an SSH folder to edit Basic programs. Can this be done?

      - I installed Java 11 on the Linux server and now I could activate MV Basic Extension. It now shows references and goes to labels through Ctrl + Click.

      - I still cant' connect to the Universe database. When the extension activated, it created all the .rmv/config files, and tried several different configurations for the the db.mvbasic.json file, but with no luck. Any ideas?



    ------------------------------
    Enrique Murphy
    Software Engineer
    Aleator SRL
    Buenos Aires Argentina
    ------------------------------



  • 3.  RE: Problem Connecting to Universe DB

    ROCKETEER
    Posted 08-25-2021 10:37
    Edited by Christian Bristow 08-25-2021 11:22
    In the first communication it looks like you are trying to connect to your remote server. You can't do that yet as it's local server code access only. You could however install a local trial version of UniVerse for Windows to play with or you could use VS Code for Linux. I am unsure if this is the only reason why you are getting the "Java 11 or Open JDK runtime environment is abnormal. ".  

    Currently it's not supported to use ssh but I can get ssh to work ok too. Perhaps an alternative is what Manu Fernandez is doing under the forum title of "Rocket-mvbasic and Sftp extension". The connection configuration in db.mvbasic.json is for is currently for a local connection only. You may find you can get away with just having the data source set correctly.

    Developers are currently working on how to either remote connect or sync.

    ------------------------------
    Christian Bristow
    TSE
    Rocket Software Inc
    ------------------------------



  • 4.  RE: Problem Connecting to Universe DB

    Posted 08-25-2021 15:03
    Hi Christian!

      Thanks for your reply. Oh, I see, so MVVS is actually works with local Universe copies only. The problem is that our development environments are Windows, but production are Linux, so, I think I will keep using VS Code to code through SSH against our development / production servers.

      Regards!



    ------------------------------
    Enrique Murphy
    Software Engineer
    Aleator SRL
    Buenos Aires Argentina
    ------------------------------



  • 5.  RE: Problem Connecting to Universe DB

    PARTNER
    Posted 08-25-2021 16:03
    Hi

    We work like you win/lin as prod and dev is lin.
    So I'll share my experience to sync our code locally with extension. Please take a look to these post MVVS: MV Basic for Visual Studio
    Rocketsoftware remove preview
    MVVS: MV Basic for Visual Studio
    I'll share our experience to edit the BASIC code locally with vscode/rocket-mvbasic.Simply, we combine the rocket-mvbasic with sftp extension sftp sync extension for VS Code - setup a ssh service on your db-server c.f.
    View this on Rocketsoftware >

    Regards

    ------------------------------
    Manu Fernandes
    ------------------------------



  • 6.  RE: Problem Connecting to Universe DB

    Posted 08-26-2021 10:43
    Hi Manu, 

      Thanks for the reply and suggestion. I was reading your post, but what I see is that something similar to what we already have running. We can actually open Basic programs using an SSH folder from VS Code, and activate the MV Basic Extension. So, formatting is working, warnings, and jumps to internal basic subroutines. In the solution your are proposing, I can't see that connection to the DB could be done, also, as it would not be a local connection. Did you get that working?

      What we can't get working is the following:

      1. Identification (Definition) of equates. This is, that VS Code can determine that an equate is correct, the way it does in Basic Developer Kit, for example. Today, the extension is not recognizing the declared equates.

      2. Function and Subroutine definitions. This is, that VS Code could show us the parameters of a subroutine or function compiled and catalogued in the same basic file (for example, BP)
      
      3. Basic compilation and catalogue. This would be the last thing to achieve, we would be great with the two indicated above.

      Regards,
      Enrique

    ------------------------------
    Enrique Murphy
    Software Engineer
    Aleator SRL
    Buenos Aires Argentina
    ------------------------------



  • 7.  RE: Problem Connecting to Universe DB

    ROCKETEER
    Posted 08-26-2021 21:40
    Hi Enrique, 

    Thanks for your feedback!

    For your questions:
    1. Did you include EQU related files into BASIC program through $INCLUDE statement? And if included files and BASIC programs are not in the same folder, you may need configure the db.mvbasic.json file. You can refer Goto Definition and Include Settings to configure include related settings.


    2. Currently, the parameters in SUBROUINE could not displayed automatically, but you can configure its parameters list in .rmv/​documentation/universe/custom.json. Please refer this link.

    3. Compiled and cataloged a BASIC program are not supported yet, we are working on this.

    Hope this can help you!

    Thanks!

    ------------------------------
    Yunpu Zhao
    Software Engineer
    Rocket Software Inc
    China
    ------------------------------



  • 8.  RE: Problem Connecting to Universe DB

    Posted 09-01-2021 13:36
    Hi Yunpu!

      Thanks for your reply.

      About point 1, yes, I am using $INCLUDE BP <Name of Equate>, so, it's the same table (BP) as the basic subroutines. But, are you saying that the Goto Definition would allow me to access the definition that is in another server, not the local PC, without doing the db connection?

      Point 2 I wasn't aware. Will test it

      Point 3 OK.

      Regards,
      Enrique



    ------------------------------
    Enrique Murphy
    Software Engineer
    Aleator SRL
    Bahía Blanca Argentina
    ------------------------------



  • 9.  RE: Problem Connecting to Universe DB

    ROCKETEER
    Posted 09-03-2021 01:48
    Hi Enrique, 

    For point 1, no, currently we only support to INCLUDE files on local machine. If related files on another machine (eg. U2 server), you need pull the code to local machine, and update the db.mvbasic.json file.
    Sorry to make you confused.

    Thanks

    ------------------------------
    Yunpu Zhao
    Software Engineer
    Rocket Software Inc
    China
    ------------------------------



  • 10.  RE: Problem Connecting to Universe DB

    Posted 10-18-2021 12:49
    Hi Yunpu, I cannot get the INCLUDE to be recognized.   According to the instructions, to define the INCLUDE files you must define the account.  When I attempt to define the account "path" using a standard Windows path, Visual Studio Code thinks I am escaping the characters and removes the backslashes.  (ie: "c:\User\bob\Documents").  How do I point to a directory on my local pc?

    Secondly, when you refer to an account, can I point to a directory on my local PC or doe the software expect the Universe software to be installed locally?

    ------------------------------
    Steve Gleason
    Senior Programmer Analyst
    Guitar Center
    Westlake Village CA United States
    ------------------------------



  • 11.  RE: Problem Connecting to Universe DB

    ROCKETEER
    Posted 10-18-2021 14:05
    Edited by Christian Bristow 10-18-2021 14:13
    Hi Steve,
    Try using double slash ie c:\\User\\bob\\Documents. No, the include doesn't mean local but on the connection of the db section of db.mvbasic.json which may be local.

    ------------------------------
    Christian Bristow
    TSE
    Rocket Software Inc
    ------------------------------



  • 12.  RE: Problem Connecting to Universe DB

    Posted 10-19-2021 10:55
    Hi Christian, thank you for your response.  I was able to add the path using the double slash.  However, the INCLUDEs are still not recognized.

    I configured the db.mvbasic.json in the following manner:

      "includeMapping": [
      {
        "includeFile": "INCLUDE",
        "account": "LOCALACC",
        "fileName": "INCLUDE"
      }
    ],
    "accounts": [
      {
        "name": "LOCALACC",
        "path": "C:\\Users\\steve\\Documents"
      }
    ]
    Both the directory with the programs and the INCLUDE directory are under the same directory "c:\Users\steve\Documents"

    Any ideas?


    ------------------------------
    Steve Gleason
    Senior Programmer Analyst
    Guitar Center
    Westlake Village CA United States
    ------------------------------



  • 13.  RE: Problem Connecting to Universe DB

    ROCKETEER
    Posted 10-19-2021 12:29
    Steve, I will create a support ticket and reach out to you there. There may be something specific to your environment.

    ------------------------------
    Christian Bristow
    TSE
    Rocket Software Inc
    ------------------------------