与.NET中的AS400 (IBM i)通信时的最佳实践

时间:2023-01-29 15:20:18

I need some help on what's important and best practices when building a .NET based reporting solution on top of an existing AS400 based system.

在现有的基于AS400的系统之上构建基于。net的报告解决方案时,我需要一些关于什么是重要的和最佳实践的帮助。

  • What's the most suited integration technology (ODBC, OLE DB, ADO.NET) and does that depend on what version of AS400 we're talking about? Is it always DB2 databases or does that vary to? What other persistency system are usually used?
  • 什么是最适合的集成技术(ODBC、OLE DB、ADO.NET),这取决于我们正在讨论的AS400版本吗?它总是DB2数据库,还是会随其变化?通常使用什么其他持久性系统?
  • Is it possible to call programs in the mainframe that has logic in them or is preferable to replicate that logic in the .NET layer and then call the mainframe DB directly?
  • 是否有可能在大型机中调用包含逻辑的程序,或者最好在.NET层中复制该逻辑,然后直接调用大型机DB ?
  • I guess a reporting system should be online and call the mainframe DB directly or are there other ways (for example file export etc.) that would be preferred?
  • 我想报告系统应该是在线的,直接调用大型机DB,还是有其他更好的方式(例如文件导出等)?
  • What technical details are important to find out before starting the project (AS400 version etc.) to eliminate problems.
  • 在开始项目(AS400版本等)之前,什么技术细节是重要的,以消除问题。

Basically I'm interested (and will vote up) in all information and experiences from .NET/AS400 projects. I've never done it before and need to know the pitfalls before project start.

基本上,我感兴趣(并且将会投票)所有的信息和经验。net / as400项目。我以前从来没有做过,在项目开始之前我需要知道这些陷阱。

4 个解决方案

#1


2  

If you're not familiar with OS/400, be prepared for a steep learning curve. Try and reduce the pain by enlisting the local AS/400 wizard, it will be indispensable for writing the odd CL program, getting authorisations etc.

如果你不熟悉OS/400,准备好面对一个陡峭的学习曲线。尝试通过注册本地AS/400向导来减少痛苦,这对于编写奇数CL程序、获得授权等都是必不可少的。

Personally I always stayed with the ODBC drivers supplied with Client Access, but only for read-only. I can't justify this, but a decade of AS/400 programming taught me that trying to update an AS/400 database from outside the AS/400 is a bad idea.

就我个人而言,我始终与提供客户端访问的ODBC驱动程序保持一致,但仅限于只读。我无法证明这一点,但十年的AS/400编程让我认识到,试图从AS/400之外更新AS/400数据库是一个坏主意。

It is indeed possible to call AS/400 CL programs from your .NET app and, if the business logic is already programmed there, then using it makes sense; re-inventing it in .NET is expensive, error-prone and will be much slower.

确实有可能从。net应用程序调用AS/400 CL程序,如果业务逻辑已经在那里编程,那么使用它是有意义的;在。net中重新发明它是昂贵的、容易出错的,而且速度会慢得多。

Same message for reporting: use the existing ones if possible.

报告的消息相同:尽可能使用现有的消息。

Things to look out for (some of these may well be outdated):

需要注意的事情(其中一些很可能已经过时了):

DB2 SQL has many subtle differences to other SQL dialects. Many DBMSs will accept

DB2 SQL与其他SQL方言有许多微妙的区别。许多dbms将接受

SELECT X, Y FROM A, B WHERE A.T=B.T

as equivalent to

相当于

SELECT X,Y FROM A INNER JOIN B ON A.T=B.T

DB2 may or may not see it, depending on the tables. When it doesn't, the former can be very slow. That said, if you have a performance issue, there are some very slick tools to analyse the DB/2 query plans; you'll need your AS/400 wizard to use them though as they're a little obscure.

DB2可能会看到,也可能看不到,这取决于表。如果没有,前者可能会很慢。也就是说,如果您有性能问题,有一些非常灵活的工具可以分析DB/2查询计划;您需要您的AS/400向导来使用它们,尽管它们有点晦涩。

If you're in an international environment, handling code-pages needs care. Make sure all your AS/400s have the same system codepage.

如果您在一个国际化的环境中,处理代码页需要小心。确保所有的AS/400s都有相同的系统代码页。

If you're in a multi-AS/400 setup, be aware that local and remote tables can be accessed transparently (with passthrough).

如果您在一个多as /400设置中,请注意,可以透明地访问本地和远程表(通过passthrough)。

OS/400 has a long history of extensive backward support. You will generally not have to worry about versions at all, as long as all the AS/400s you are talking to are on the same major release. It is also a very stable platform; operating system bugs are very rare and quickly fixed.

OS/400有着广泛的落后支持的悠久历史。您通常不需要担心任何版本,只要与您交谈的所有as /400s都在同一个主要版本中。它也是一个非常稳定的平台;操作系统错误是非常罕见的,并且可以快速修复。

If you can manage it, get access to a test system with *ALLOBJ privilege. This will allow you to focus on the problem at hand and deal with the security issues later.

如果您可以管理它,那么可以使用*ALLOBJ特权访问测试系统。这将使您能够专注于手头的问题,并在稍后处理安全问题。

HTH

HTH

#2


3  

Ok I used to work with and connect to AS/400 and mainframe systems from .NET several years ago. I might not be able to answer your questions directly but I can let you know what worked for me and some of the stuff I did in the past.

几年前,我曾在。net工作并连接AS/400和大型机系统。我可能无法直接回答你的问题,但我可以告诉你什么对我有用,以及我过去做过的一些事情。

A common term for this type of work is Enterprise Application Integration (EAI) so you could start by reading up on that. As far as I know it is possible to have more than just DB2 databases on AS/400s. There were 2 ways in which we worked with green screen (or legacy) applications:

这种类型的工作的一个常见术语是企业应用程序集成(Enterprise Application Integration, EAI),因此您可以从阅读它开始。据我所知,有可能不仅仅是使用DB2数据库作为/400s。我们使用绿屏(或遗留)应用程序有两种方式:

  1. Access the data source/stores directly
  2. 直接访问数据源/存储
  3. Create a session, send keystrokes such as F10, F4 etc. that the legacy app uses to navigate through different screen, and grab data from fixed points on the legacy screen (this is sometimes called screen scraping).
  4. 创建一个会话,发送诸如F10、F4等按键,这是遗留应用程序用来在不同的屏幕上导航,并从遗留屏幕上的固定点抓取数据(有时称为屏幕抓取)。

To partially answer your first question, to access the data sources directly we created DSNs (data source name) using ODBC drivers which were available from 2 companies at the time, Rumba (made by Wall Data), and Attachmate (made by I think IBM). To create an ODBC DSN you typically went into Admin Tools/Data Sources and added a system DSN. You would need the (legacy system) host name, user name to log on with and password. We then used these DSNs inside .NET apps to create a connection to the legacy apps. If you have a DSN you can then use something like SQL Server DTS/SSIS to grab data from the source and save it in some location, whether that be the database, CSV files, Excel files etc. It's also more than likely possible to have a reporting tool (Crystal/SQL Server Reporting Services) access the data source directly using the DSN so you could report directly from the data source. Also you could probably create DSN-less connections as well, years ago we needed DSNs.

为了回答第一个问题,我们直接访问数据源,我们使用ODBC驱动程序创建了DSNs(数据源名称),这些驱动程序是由当时的两家公司提供的,Rumba(由Wall data制作)和Attachmate(我认为是IBM做的)。为了创建一个ODBC DSN,您通常会进入管理工具/数据源,并添加一个系统DSN。您需要(遗留系统)主机名、要登录的用户名和密码。然后,我们在。net应用程序中使用这些DSNs来创建与遗留应用程序的连接。如果你有一个DSN然后您可以使用类似于SQL Server DTS / SSIS抓住数据从源并将其保存在某些位置,不管是数据库,CSV文件、Excel文件等,也更可能报告工具(水晶/ SQL Server reporting Services)直接访问数据源使用DSN所以你可以直接从数据源汇报。同样,您也可以创建没有dtd的连接,多年前我们需要dsn。

To partially answer your 2nd question it is possible to call and use the logic on green screen apps if you want to. A green screen is typically divided into a set number of rows and columns, and we used a standard called HLLAPI that sent keystrokes from a Windows system to positions on a legacy screen. We used Rumba for this which was available as an OCX control and I'm sure Attachmate is also. For example you could create a Winforms form with User ID and password text boxes, then create a session to the legacy app, and usually the first screen would be a logon screen. Then using the positions of the user name and password fields on the green screen send the User ID and password to those positions, and then send an Enter keystroke or whatever was needed to log on. You could then navigate to another screen e.g. a search screen, send the data and keystrokes to perform a search, then grab the resulting data from the green screen. Another approach is to create Win/Web forms that replicate the green screen app and get data from the data stores directly. The advantage of this is that you don't have to know the keystrokes / navigation of the legacy application which could get cumbersome for a large green screen system. There's no right or wrong it depends on the circumstances. Our company did a mixture of both.

要部分回答你的第二个问题,如果你愿意的话,可以在绿色屏幕应用程序上调用并使用逻辑。一个绿色的屏幕通常被划分为一组行和列,我们使用了一个名为HLLAPI的标准,该标准将Windows系统的击键发送到遗留屏幕上的位置。我们使用了伦巴作为OCX控件,我相信Attachmate也可以。例如,您可以使用用户ID和密码文本框创建Winforms表单,然后为遗留应用程序创建会话,通常第一个屏幕是登录屏幕。然后使用绿色屏幕上的用户名和密码字段的位置将用户ID和密码发送到这些位置,然后发送一个输入键击或任何需要登录的内容。然后,您可以导航到另一个屏幕,例如一个搜索屏幕,发送数据和击键来执行搜索,然后从绿色屏幕获取结果数据。另一种方法是创建Win/Web表单来复制绿色屏幕应用程序,并直接从数据存储中获取数据。这样做的好处是,您不必知道遗留应用程序的击键/导航,对于大型的绿色屏幕系统来说,这些操作会变得很麻烦。没有对错,这要视情况而定。我们公司把这两者结合起来。

For your third question it depends on the type of reports you want. If they need to be real time then you can connect directly to the data store. If they don't need to be real time you could do nightly transfers of the data from the legacy system and store the data in SQL Server for example, then run your reports against the SQL Server data.

第三个问题取决于你想要的报告类型。如果它们需要实时,那么您可以直接连接到数据存储。如果它们不需要实时,您可以从遗留系统进行数据的夜间传输,并将数据存储在SQL Server中,然后针对SQL Server数据运行报表。

One answer for your 4th question is that you will definitely need to get your hands on someone that knows the green screen application. You will be spending hours and hours going through the screens on the legacy app so access to user(s) that know the system is crucial. Also you will need logon id and passwords etc.

对于你的第四个问题的一个答案是,你肯定需要找到一个熟悉绿屏应用程序的人。你将花费数小时的时间浏览遗留应用程序的屏幕,以便访问那些知道系统至关重要的用户。您还需要登录id和密码等。

Finally there are some 3rd party companies that specialise in transferring data from source to destination, one off the top of my head is Data Mirror. Another approach would be to use a middle tier integration product like BizTalk or Tibco, both of which take data from one or more sources and stick them in one or more destinations, but this may be overkill depending on your requirements.

最后,有一些第三方公司专门从事从源到目的地的数据传输,我脑海中浮现的一个就是data Mirror。另一种方法是使用中间层集成产品,如BizTalk或Tibco,这两种产品都从一个或多个源获取数据并将它们粘在一个或多个目的地,但这可能会超出您的需求。

Hope that helps and good luck :)

希望这对你有帮助,祝你好运。

#3


2  

I use the Client Access (of whatever it's called now) drivers to connect to the server which I believe are based on ADO.NET. Through the version of the driver I have (we are on V5R4), you cannot and would have to create stored procedures to call the programs (which isn't hard). I thought I heard on the latest version you can execute programs, but I am not certain.

我使用客户端访问(不管它现在叫什么)驱动程序连接到服务器,我相信这是基于ADO.NET的。通过我拥有的驱动程序版本(我们在V5R4上),您不能也必须创建存储过程来调用程序(这并不难)。我想我听说最新的版本可以执行程序,但我不确定。

The only other thing I would look at is creating a user with only the authorities you need to do what you need to do in case someone gets a hold of that username and password, they cannot do too much. We had setup a read-only (*USE) user and a rwx (*CHANGE) user.

我要考虑的另一件事是创建一个用户,它只有权限,如果有人获得用户名和密码,你需要做什么,他们不能做太多。我们设置了一个只读(*USE)用户和一个rwx (*CHANGE)用户。

#4


0  

[Sorry did not see that this is an old post. Hope its is still useful]

对不起,我没看到这是一个旧帖子。希望它仍然有用

I have written both green screen and .Net applications. From my experience..

我已经编写了绿屏和。net应用程序。从我的经验. .

1. ODBC - works but you need to set ODBC settings at all user PC. .NET Data Provider is better due to more .net specific stuffs inside and don't need to set ODBC settings at all clients. Before .net provider available in as400, i mostly use OLEDB. Refer to http://www-03.ibm.com/systems/i/software/access/windows/dotnet/ for details

1。ODBC -可以工作,但是您需要在所有用户PC上设置ODBC设置。net数据提供程序更好,因为其中包含了更多。net特定的内容,并且不需要在所有客户机上设置ODBC设置。在.net提供程序在as400中可用之前,我主要使用OLEDB。详情请参阅http://www-03.ibm.com/systems/i/software/access/windows/dotnet/

2.Use stored procedures. Stored procedures normally faster than putting all logics inside .net. Create either SQL or external stored procedure written in RPG,CL,COBOL,C++,etc... I don't re-write all RPG old logic in .net, i just change old RPG program little bit and make it into External stored procedure

2。使用存储过程。存储过程通常比在。net中放入所有逻辑要快。创建用RPG、CL、COBOL、c++等编写的SQL或外部存储过程。我没有在。net中重写所有的RPG旧逻辑,我只是稍微修改一下旧的RPG程序,把它变成外部存储过程

3.For reports, again use stored procedures that passed back result sets. Its fast, cleaner and works well with Crystal Report.

3所示。对于报表,再次使用传递回结果集的存储过程。它的快速,清洁和工作良好的晶体报告。

4.Technical details. If you have many clients to install the program - use Web Services - you don't have to install Client Access with correct version at all PCs.

4所示。技术细节。如果你有很多客户端来安装程序-使用Web服务-你不必在所有的pc上安装正确版本的客户端访问。

Watch your OS400 version. If using OS400 version V6R1 and above, make sure client access used is V5R4 or higher - Stored procedures might not works well in older Client Access.

看你OS400版本。如果使用OS400版本V6R1或以上版本,请确保使用的客户端访问是V5R4或更高版本——在旧的客户端访问中,存储过程可能不能正常工作。

ODBC works in older client access but i think .NET Data Provider only works in V5R3.

ODBC在老客户端访问,但我认为。net数据提供者只在V5R3中工作。

If you compile .net program using .NET Data Provider V6R1, then you user client access also have to be V6R1.

如果您使用。net数据提供程序V6R1编译。net程序,那么您的用户客户端访问也必须是V6R1。

Use Stored Procedure whenever possible for security (don't need to expose tables) and simplify program logic (can re-use RPG program)

尽可能使用存储过程来保证安全性(不需要公开表)并简化程序逻辑(可以重用RPG程序)

On OS400 side, make sure system value QCCSID is set with proper CCSID e.g. 37 for English. ODBC,OLEDB, .net driver will automatically convert/translate proper character to your .Net program. Never leave the value as 65535.

在OS400方面,确保系统值QCCSID与适当的CCSID(如英语中的37)一起设置。ODBC、OLEDB和。net驱动程序会自动地将适当的字符转换成。net程序。不要将值保留为65535。

Hope this helps.

希望这个有帮助。

#1


2  

If you're not familiar with OS/400, be prepared for a steep learning curve. Try and reduce the pain by enlisting the local AS/400 wizard, it will be indispensable for writing the odd CL program, getting authorisations etc.

如果你不熟悉OS/400,准备好面对一个陡峭的学习曲线。尝试通过注册本地AS/400向导来减少痛苦,这对于编写奇数CL程序、获得授权等都是必不可少的。

Personally I always stayed with the ODBC drivers supplied with Client Access, but only for read-only. I can't justify this, but a decade of AS/400 programming taught me that trying to update an AS/400 database from outside the AS/400 is a bad idea.

就我个人而言,我始终与提供客户端访问的ODBC驱动程序保持一致,但仅限于只读。我无法证明这一点,但十年的AS/400编程让我认识到,试图从AS/400之外更新AS/400数据库是一个坏主意。

It is indeed possible to call AS/400 CL programs from your .NET app and, if the business logic is already programmed there, then using it makes sense; re-inventing it in .NET is expensive, error-prone and will be much slower.

确实有可能从。net应用程序调用AS/400 CL程序,如果业务逻辑已经在那里编程,那么使用它是有意义的;在。net中重新发明它是昂贵的、容易出错的,而且速度会慢得多。

Same message for reporting: use the existing ones if possible.

报告的消息相同:尽可能使用现有的消息。

Things to look out for (some of these may well be outdated):

需要注意的事情(其中一些很可能已经过时了):

DB2 SQL has many subtle differences to other SQL dialects. Many DBMSs will accept

DB2 SQL与其他SQL方言有许多微妙的区别。许多dbms将接受

SELECT X, Y FROM A, B WHERE A.T=B.T

as equivalent to

相当于

SELECT X,Y FROM A INNER JOIN B ON A.T=B.T

DB2 may or may not see it, depending on the tables. When it doesn't, the former can be very slow. That said, if you have a performance issue, there are some very slick tools to analyse the DB/2 query plans; you'll need your AS/400 wizard to use them though as they're a little obscure.

DB2可能会看到,也可能看不到,这取决于表。如果没有,前者可能会很慢。也就是说,如果您有性能问题,有一些非常灵活的工具可以分析DB/2查询计划;您需要您的AS/400向导来使用它们,尽管它们有点晦涩。

If you're in an international environment, handling code-pages needs care. Make sure all your AS/400s have the same system codepage.

如果您在一个国际化的环境中,处理代码页需要小心。确保所有的AS/400s都有相同的系统代码页。

If you're in a multi-AS/400 setup, be aware that local and remote tables can be accessed transparently (with passthrough).

如果您在一个多as /400设置中,请注意,可以透明地访问本地和远程表(通过passthrough)。

OS/400 has a long history of extensive backward support. You will generally not have to worry about versions at all, as long as all the AS/400s you are talking to are on the same major release. It is also a very stable platform; operating system bugs are very rare and quickly fixed.

OS/400有着广泛的落后支持的悠久历史。您通常不需要担心任何版本,只要与您交谈的所有as /400s都在同一个主要版本中。它也是一个非常稳定的平台;操作系统错误是非常罕见的,并且可以快速修复。

If you can manage it, get access to a test system with *ALLOBJ privilege. This will allow you to focus on the problem at hand and deal with the security issues later.

如果您可以管理它,那么可以使用*ALLOBJ特权访问测试系统。这将使您能够专注于手头的问题,并在稍后处理安全问题。

HTH

HTH

#2


3  

Ok I used to work with and connect to AS/400 and mainframe systems from .NET several years ago. I might not be able to answer your questions directly but I can let you know what worked for me and some of the stuff I did in the past.

几年前,我曾在。net工作并连接AS/400和大型机系统。我可能无法直接回答你的问题,但我可以告诉你什么对我有用,以及我过去做过的一些事情。

A common term for this type of work is Enterprise Application Integration (EAI) so you could start by reading up on that. As far as I know it is possible to have more than just DB2 databases on AS/400s. There were 2 ways in which we worked with green screen (or legacy) applications:

这种类型的工作的一个常见术语是企业应用程序集成(Enterprise Application Integration, EAI),因此您可以从阅读它开始。据我所知,有可能不仅仅是使用DB2数据库作为/400s。我们使用绿屏(或遗留)应用程序有两种方式:

  1. Access the data source/stores directly
  2. 直接访问数据源/存储
  3. Create a session, send keystrokes such as F10, F4 etc. that the legacy app uses to navigate through different screen, and grab data from fixed points on the legacy screen (this is sometimes called screen scraping).
  4. 创建一个会话,发送诸如F10、F4等按键,这是遗留应用程序用来在不同的屏幕上导航,并从遗留屏幕上的固定点抓取数据(有时称为屏幕抓取)。

To partially answer your first question, to access the data sources directly we created DSNs (data source name) using ODBC drivers which were available from 2 companies at the time, Rumba (made by Wall Data), and Attachmate (made by I think IBM). To create an ODBC DSN you typically went into Admin Tools/Data Sources and added a system DSN. You would need the (legacy system) host name, user name to log on with and password. We then used these DSNs inside .NET apps to create a connection to the legacy apps. If you have a DSN you can then use something like SQL Server DTS/SSIS to grab data from the source and save it in some location, whether that be the database, CSV files, Excel files etc. It's also more than likely possible to have a reporting tool (Crystal/SQL Server Reporting Services) access the data source directly using the DSN so you could report directly from the data source. Also you could probably create DSN-less connections as well, years ago we needed DSNs.

为了回答第一个问题,我们直接访问数据源,我们使用ODBC驱动程序创建了DSNs(数据源名称),这些驱动程序是由当时的两家公司提供的,Rumba(由Wall data制作)和Attachmate(我认为是IBM做的)。为了创建一个ODBC DSN,您通常会进入管理工具/数据源,并添加一个系统DSN。您需要(遗留系统)主机名、要登录的用户名和密码。然后,我们在。net应用程序中使用这些DSNs来创建与遗留应用程序的连接。如果你有一个DSN然后您可以使用类似于SQL Server DTS / SSIS抓住数据从源并将其保存在某些位置,不管是数据库,CSV文件、Excel文件等,也更可能报告工具(水晶/ SQL Server reporting Services)直接访问数据源使用DSN所以你可以直接从数据源汇报。同样,您也可以创建没有dtd的连接,多年前我们需要dsn。

To partially answer your 2nd question it is possible to call and use the logic on green screen apps if you want to. A green screen is typically divided into a set number of rows and columns, and we used a standard called HLLAPI that sent keystrokes from a Windows system to positions on a legacy screen. We used Rumba for this which was available as an OCX control and I'm sure Attachmate is also. For example you could create a Winforms form with User ID and password text boxes, then create a session to the legacy app, and usually the first screen would be a logon screen. Then using the positions of the user name and password fields on the green screen send the User ID and password to those positions, and then send an Enter keystroke or whatever was needed to log on. You could then navigate to another screen e.g. a search screen, send the data and keystrokes to perform a search, then grab the resulting data from the green screen. Another approach is to create Win/Web forms that replicate the green screen app and get data from the data stores directly. The advantage of this is that you don't have to know the keystrokes / navigation of the legacy application which could get cumbersome for a large green screen system. There's no right or wrong it depends on the circumstances. Our company did a mixture of both.

要部分回答你的第二个问题,如果你愿意的话,可以在绿色屏幕应用程序上调用并使用逻辑。一个绿色的屏幕通常被划分为一组行和列,我们使用了一个名为HLLAPI的标准,该标准将Windows系统的击键发送到遗留屏幕上的位置。我们使用了伦巴作为OCX控件,我相信Attachmate也可以。例如,您可以使用用户ID和密码文本框创建Winforms表单,然后为遗留应用程序创建会话,通常第一个屏幕是登录屏幕。然后使用绿色屏幕上的用户名和密码字段的位置将用户ID和密码发送到这些位置,然后发送一个输入键击或任何需要登录的内容。然后,您可以导航到另一个屏幕,例如一个搜索屏幕,发送数据和击键来执行搜索,然后从绿色屏幕获取结果数据。另一种方法是创建Win/Web表单来复制绿色屏幕应用程序,并直接从数据存储中获取数据。这样做的好处是,您不必知道遗留应用程序的击键/导航,对于大型的绿色屏幕系统来说,这些操作会变得很麻烦。没有对错,这要视情况而定。我们公司把这两者结合起来。

For your third question it depends on the type of reports you want. If they need to be real time then you can connect directly to the data store. If they don't need to be real time you could do nightly transfers of the data from the legacy system and store the data in SQL Server for example, then run your reports against the SQL Server data.

第三个问题取决于你想要的报告类型。如果它们需要实时,那么您可以直接连接到数据存储。如果它们不需要实时,您可以从遗留系统进行数据的夜间传输,并将数据存储在SQL Server中,然后针对SQL Server数据运行报表。

One answer for your 4th question is that you will definitely need to get your hands on someone that knows the green screen application. You will be spending hours and hours going through the screens on the legacy app so access to user(s) that know the system is crucial. Also you will need logon id and passwords etc.

对于你的第四个问题的一个答案是,你肯定需要找到一个熟悉绿屏应用程序的人。你将花费数小时的时间浏览遗留应用程序的屏幕,以便访问那些知道系统至关重要的用户。您还需要登录id和密码等。

Finally there are some 3rd party companies that specialise in transferring data from source to destination, one off the top of my head is Data Mirror. Another approach would be to use a middle tier integration product like BizTalk or Tibco, both of which take data from one or more sources and stick them in one or more destinations, but this may be overkill depending on your requirements.

最后,有一些第三方公司专门从事从源到目的地的数据传输,我脑海中浮现的一个就是data Mirror。另一种方法是使用中间层集成产品,如BizTalk或Tibco,这两种产品都从一个或多个源获取数据并将它们粘在一个或多个目的地,但这可能会超出您的需求。

Hope that helps and good luck :)

希望这对你有帮助,祝你好运。

#3


2  

I use the Client Access (of whatever it's called now) drivers to connect to the server which I believe are based on ADO.NET. Through the version of the driver I have (we are on V5R4), you cannot and would have to create stored procedures to call the programs (which isn't hard). I thought I heard on the latest version you can execute programs, but I am not certain.

我使用客户端访问(不管它现在叫什么)驱动程序连接到服务器,我相信这是基于ADO.NET的。通过我拥有的驱动程序版本(我们在V5R4上),您不能也必须创建存储过程来调用程序(这并不难)。我想我听说最新的版本可以执行程序,但我不确定。

The only other thing I would look at is creating a user with only the authorities you need to do what you need to do in case someone gets a hold of that username and password, they cannot do too much. We had setup a read-only (*USE) user and a rwx (*CHANGE) user.

我要考虑的另一件事是创建一个用户,它只有权限,如果有人获得用户名和密码,你需要做什么,他们不能做太多。我们设置了一个只读(*USE)用户和一个rwx (*CHANGE)用户。

#4


0  

[Sorry did not see that this is an old post. Hope its is still useful]

对不起,我没看到这是一个旧帖子。希望它仍然有用

I have written both green screen and .Net applications. From my experience..

我已经编写了绿屏和。net应用程序。从我的经验. .

1. ODBC - works but you need to set ODBC settings at all user PC. .NET Data Provider is better due to more .net specific stuffs inside and don't need to set ODBC settings at all clients. Before .net provider available in as400, i mostly use OLEDB. Refer to http://www-03.ibm.com/systems/i/software/access/windows/dotnet/ for details

1。ODBC -可以工作,但是您需要在所有用户PC上设置ODBC设置。net数据提供程序更好,因为其中包含了更多。net特定的内容,并且不需要在所有客户机上设置ODBC设置。在.net提供程序在as400中可用之前,我主要使用OLEDB。详情请参阅http://www-03.ibm.com/systems/i/software/access/windows/dotnet/

2.Use stored procedures. Stored procedures normally faster than putting all logics inside .net. Create either SQL or external stored procedure written in RPG,CL,COBOL,C++,etc... I don't re-write all RPG old logic in .net, i just change old RPG program little bit and make it into External stored procedure

2。使用存储过程。存储过程通常比在。net中放入所有逻辑要快。创建用RPG、CL、COBOL、c++等编写的SQL或外部存储过程。我没有在。net中重写所有的RPG旧逻辑,我只是稍微修改一下旧的RPG程序,把它变成外部存储过程

3.For reports, again use stored procedures that passed back result sets. Its fast, cleaner and works well with Crystal Report.

3所示。对于报表,再次使用传递回结果集的存储过程。它的快速,清洁和工作良好的晶体报告。

4.Technical details. If you have many clients to install the program - use Web Services - you don't have to install Client Access with correct version at all PCs.

4所示。技术细节。如果你有很多客户端来安装程序-使用Web服务-你不必在所有的pc上安装正确版本的客户端访问。

Watch your OS400 version. If using OS400 version V6R1 and above, make sure client access used is V5R4 or higher - Stored procedures might not works well in older Client Access.

看你OS400版本。如果使用OS400版本V6R1或以上版本,请确保使用的客户端访问是V5R4或更高版本——在旧的客户端访问中,存储过程可能不能正常工作。

ODBC works in older client access but i think .NET Data Provider only works in V5R3.

ODBC在老客户端访问,但我认为。net数据提供者只在V5R3中工作。

If you compile .net program using .NET Data Provider V6R1, then you user client access also have to be V6R1.

如果您使用。net数据提供程序V6R1编译。net程序,那么您的用户客户端访问也必须是V6R1。

Use Stored Procedure whenever possible for security (don't need to expose tables) and simplify program logic (can re-use RPG program)

尽可能使用存储过程来保证安全性(不需要公开表)并简化程序逻辑(可以重用RPG程序)

On OS400 side, make sure system value QCCSID is set with proper CCSID e.g. 37 for English. ODBC,OLEDB, .net driver will automatically convert/translate proper character to your .Net program. Never leave the value as 65535.

在OS400方面,确保系统值QCCSID与适当的CCSID(如英语中的37)一起设置。ODBC、OLEDB和。net驱动程序会自动地将适当的字符转换成。net程序。不要将值保留为65535。

Hope this helps.

希望这个有帮助。