简体   繁体   English

UniData列出所有可用的子例程/所有参数

[英]UniData List all avaiable subroutines / All parameters

I am trying to wrap some UniData Subroutines to SOAP Web Service. 我正在尝试将一些UniData子例程包装到SOAP Web服务。 I'm planning to use C# and UODOTNET library (IBM U2 Data Management Interface for .NET). 我打算使用C#和UODOTNET库(用于.NET的IBM U2数据管理接口)。 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. 另外,我还希望创建一个引擎来从数据服务器读取所有可用的子例程,并且还读取所有必需的参数并动态生成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? 问题1:是否可以使用任何命令来检索所有可用子例程的列表?

Question 2: Is there any command that I can use to retrieve list of all parameters for specific subroutine? 问题2:是否可以使用任何命令来检索特定子例程的所有参数的列表?

Cheers 干杯

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. 在这里了解VOC的工作原理,尤其是如何对可执行代码进行分类。
  • Learn about the CATALOG and how cataloguing programs globally, locally and direct differ. 了解CATALOG,以及在全球,本地和直接分类目录的方式。
  • Understand how your system in particular is designed. 了解您的系统是如何设计的。 Some places have everything directly catalogued in the VOC, others are a mix. 有些地方的所有物品都直接在VOC中分类,其他地方则是混合在一起。 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. 了解了以上内容后,您将知道如何从VOC,本地目录和全局目录中获取所有可执行程序的列表。 For example, a simplified example for the VOC is the UniQuery command LIST VOC WITH F1="C" . 例如,VOC的简化示例是UniQuery命令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. 为此,您有2个选项。

  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. 如果您有权访问相关的源代码,请对其进行解析以生成列表。

Just wanted to add a comment on this one, in UniData there is a MAKE.MAP.FILE command that will identify Programs and Subroutines ( and the number of parameters) which puts the information in the '_MAP_' file. 只是想对此添加注释,在UniData中有一个MAKE.MAP.FILE命令,该命令将标识程序和子例程(以及参数的数量),并将信息放入“ _MAP_”文件中。 This does not tell you what the parameters are used for, but it helps. 这不会告诉您参数的用途,但会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM