简体   繁体   English

将外部程序移动到不同的库时如何防止 IBM i 更改外部存储过程的库

[英]How to prevent IBM i from changing the library of an external stored-procedure when moving external program to a different library

I've noticed that the IBM i will automatically change the library of an external stored-procedure to match the library of the external program when the program is moved.我注意到 IBM i 会在程序移动时自动更改外部存储过程的库以匹配外部程序的库。 Is there a way to stop that?有没有办法阻止它?

For example:例如:

  1. Let's say that I've this RPGLE program => MYLIB1/TESTRP.假设我有这个 RPGLE 程序 => MYLIB1/TESTRP。

  2. I used below to create an external stored-procedure for it:我在下面使用它为它创建了一个外部存储过程:

     CREATE PROCEDURE MYLIB1/TESTSP() Language RPGLE External name TESTRP
  3. Using query below, I can see that the stored procedure is being created under library MYLIB1 (SPECIFIC_SCHEMA = 'MYLIB1').使用下面的查询,我可以看到存储过程正在库 MYLIB1 (SPECIFIC_SCHEMA = 'MYLIB1') 下创建。

     SELECT * FROM QSYS2/SYSPROCS WHERE SPECIFIC_NAME LIKE 'TESTSP'
  4. Now, use command below to move the TESTRP program from library MYLIB1 to MYLIB2:现在,使用以下命令将 TESTRP 程序从库 MYLIB1 移动到 MYLIB2:

     MOVOBJ OBJ(MYLIB1/TESTRP) OBJTYPE(*PGM) TOLIB(MYLIB2)
  5. Using the same query on step3, I see that IBMi automatically moved the Stored Procedure to from MYLIB1 to MYLIB2 (SPECIFIC_SCHEMA = 'MYLIB2').在第 3 步使用相同的查询,我看到 IBMi 自动将存储过程从 MYLIB1 移动到 MYLIB2 (SPECIFIC_SCHEMA = 'MYLIB2')。 Is there a way to prevent this?有没有办法防止这种情况? I want the stored procedure to stay in MYLIB1.我希望存储过程保留在 MYLIB1 中。

You should open a support case with the vendor.您应该向供应商提出支持案例。

I suspect there's a way to define the stored proc to your CMS, so that it manages it along with the external program.我怀疑有一种方法可以将存储过程定义到您的 CMS,以便它与外部程序一起管理它。

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

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