Search code examples
subroutineunidatauniobjectsrocket-u2

UniData List all avaiable subroutines / All parameters


I am trying to wrap some UniData Subroutines to SOAP Web Service. I'm planning to use C# and UODOTNET library (IBM U2 Data Management Interface for .NET). Also I'm looking to create an engine to read all the available Subroutines from data server and also reads all the required parameters and dynamically generate required codes for Web Service.

My code would be something like this:

var session = UniObjects.OpenSession(
        "192.168.0.1",
        "user",
        "password",
        "account"
        );

var cmd = session.CreateUniCommand();
cmd.Command = "LIST SUBURB.INDEX"; // ?????
cmd.Execute();
var res = cmd.Response;

Question 1: Is there any command that I can use to retrieve the list of all available subroutines?

Question 2: Is there any command that I can use to retrieve list of all parameters for specific subroutine?

Cheers


Solution

  • The short answer is no.

    The longer answer is yes, but with a lot of work.

    Since you are asking this question, I'm going to assume you are missing a lot of generally knowledge about the platform. Hence to be able to do this you'll need to:

    • Learn about how VOC works, specifically how executable code can be catalogued here.
    • Learn about the CATALOG and how cataloguing programs globally, locally and direct differ.
    • Understand how your system in particular is designed. Some places have everything directly catalogued in the VOC, others are a mix. If the former, it'll be easier for your question.

    Once you understand the above, you'll know how to get a list of all executable programs from VOC, local catalog and global catalog. For example, a simplified example for the VOC is the UniQuery command LIST VOC WITH F1="C".

    The hard part is getting the parameter list, of which there isn't any system command. To do this you have 2 options.

    1. Reverse engineer the byte code of every subroutine and tease out the number of parameters
    2. If you have access to the related source code, parse it to generate the list.