简体   繁体   English

IBM i(AS / 400)命令在本地工作,但不能在远程工作

[英]IBM i (AS/400) command works locally but not remotely

I have a Windows service written in VB.NET 2.0 which connects to an IBM AS/400 server. 我有一个用VB.NET 2.0编写的Windows服务,该服务连接到IBM AS / 400服务器。 Queries work fine, but when I try to do something like deleting a spool file, I get errors. 查询工作正常,但是当我尝试执行诸如删除假脱机文件之类的操作时,出现错误。 For example: 例如:

CPYSPLF FILE(PO630A) TOFILE(MPLCDATPAR/PO630APF) JOB(083064/ARUSER/POASYNCMON) SPLNBR(80) MBROPT(*REPLACE)

Running this command with ExecuteNonQuery yields: 使用ExecuteNonQuery运行此命令将产生:

CPF3342 - Job not found 083064/ARUSER/POASYNCMON

However, if I run that same command locally in AS/400, it works just fine. 但是,如果我在AS / 400中本地运行相同的命令,则效果很好。 We already checked permissions. 我们已经检查了权限。 What else could be causing the command to fail this way? 还有什么可能导致命令以这种方式失败? How can I get more information about the error, or go about troubleshooting this? 我如何获得有关该错误的更多信息,或对此进行故障排除?

EDIT : This problem (and a lot of other ones) appeared when we migrated our server (where the .NET service runs) from Windows Server 2003 to Windows Server 2008. 编辑 :当我们将服务器(运行.NET服务的地方)从Windows Server 2003迁移到Windows Server 2008时,出现了此问题(以及许多其他问题)。

How can I get more information about the error, or go about troubleshooting this? 我如何获得有关该错误的更多信息,或对此进行故障排除?

The first thing is to verify that the IBM AS/400 server [what OS Version Release and Modification level, Technical Refresh (TR) level ( if instead IBM i ), Cumulative PTF level were all omitted.?.?] used for the connection is the same server used to perform the command-line invocation; 第一件事是验证是否全部省略了用于连接的IBM AS / 400服务器 [什么OS版本的发行和修改级别,技术刷新(TR)级别( 如果改为IBM i ),累积PTF级别。 用于执行命令行调用的服务器相同 ie on the server where the command-line invocation will be made to verify the command is functional, find the active server job in which the CPF3342 is still visible in the log. 例如,在将通过命令行调用来验证命令功能的服务器上 ,找到在日志中仍可看到CPF3342的活动服务器作业

The second thing to do is to get the spooled joblog showing the full details of the CPF3342 [and possibly any preceding message(s) that might be related]. 第二件事是获取假脱机的作业日志,该作业日志显示CPF3342的完整详细信息(以及可能与之相关的任何先前消息)。 If for example the message is not actually that message or is not sent by the expected program QSPCPYF, then immediately the direction of investigation probably would change. 例如,如果该消息实际上不是该消息,或者不是由预期程序QSPCPYF发送的,则调查方向可能会立即改变。 What is shown is apparently what is presented at the client, not what came from the server joblog; 显示的内容显然是在客户端显示的内容,而不是来自服务器作业日志的内容。 the USEnglish formatting I believe is "Job &5/&4/&3 not found." 我认为USEnglish格式是“找不到作业&5 /&4 /&3”。 for which the formatting "CPF3342 - Job not found &5/&4/&3" is suspect. 可疑的格式为“ CPF3342-找不到作业&5 /&4 /&3”。

To ensure the most appropriate comparison to the request made from the client: • the local user that is signed-on to perform the same request should be the same user as the Current User of the active job found to be servicing the client request • the local user should establish the same System Library List as the active job found to be servicing the client request 为确保与客户端的请求进行最适当的比较:•登录以执行相同请求的本地用户应与正在为客户端请求提供服务的活动作业的当前用户为同一用户。本地用户应与为客户请求服务的活动作业建立相同的系统库列表

If such an incident recurs or even if the same incident persists, then verify the once again the re-create is still possible using the same interface [ie the condition\\failure persists] and again verify the command-line request is successful [ie the circumvention is confirmed, that the same request is possible to be performed at the command-line]; 如果此类事件再次发生或即使同一事件仍然存在,请使用相同的界面再次验证重新创建是否仍然可行(即条件\\故障仍然存在),并再次验证命令行请求是否成功[即确认规避,可以在命令行执行相同的请求]; and according to my earlier comment, first ensuring the same server by finding the active job that logs the CPF3342. 并且根据我之前的评论,首先通过找到记录CPF3342的活动作业来确保使用同一服务器 Immediately afterward: 之后立即:

• Collect a job trace for the Copy Spooled File (CPYSPLF) request; •为“复制假脱机文件”(CPYSPLF)请求收集作业跟踪; for the failing case, review for any exception\\interrupt conditions [with or without a message as accompanying trace data] that precede the program flow for the issuance of the msg CPF3342. 对于失败的情况,请检查在发出msg CPF3342的程序流程之前是否有任何异常\\中断条件(带有或不带有作为跟踪数据的消息)。

• Review the audit log for any T-AF or anything odd\\unexpected at very close to the time of the failing request; •在非常接近失败请求的时间,查看审核日志中是否有任何T-AF或任何奇数\\意外; expansive auditing should have been established since before the connection to the server. 从连接服务器开始,就应该建立扩展审核。

• Contrast those data collections of the failing case with the same data taken from the successful processing. •将失败案例的那些数据收集与从成功处理中获得的相同数据进行对比。

Although the symptom [as lightly described, without the full joblog] the possibility of command-exits seems remote, the trace would reveal if the command in either scenario were intercepted by the Command Exit points; 尽管症状[如前所述,没有完整的作业日志]似乎存在命令退出的可能性,但是跟踪将显示出两种情况下的命令是否被命令出口点拦截; these can be reviewed separately [rather than looking in the trace] for any Exit Program, using the Work With Registration Information (WRKREGINF) to review any QIBM_QCA* entries in the repository for what exit programs might impact the CL Command request. 可以使用任何注册程序(WRKREGINF)来检查任何退出程序的这些(而不是在跟踪中),可以使用注册信息(WRKREGINF)来查看存储库中的任何QIBM_QCA *条目,以了解哪些退出程序可能会影响CL Command请求。 But IIRC the trace-data shows which command was invoked, so the trace would also reveal if the unqualified command requests resolved to different *CMD objects. 但是IIRC跟踪数据显示了调用了哪个命令,因此该跟踪还将显示出不合格的命令请求是否解析为不同的* CMD对象。

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

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