CPF8E2F - 锁定 *SRVPGM 对象

CPF8E2F - Lock on *SRVPGM object

我创建了一个服务程序,它是从 COBOL、CL 和 RPGLE 程序中调用的。我有时 运行 陷入以下问题,我不确定原因。我也尝试在 Google 和 Whosebug 中搜索,但没有找到解决方案。

请告诉我这个问题的可能原因。

                    Additional Message Information                         

Message ID . . . . . . :   CPF8E2F       Severity . . . . . . . :   30         
Message type . . . . . :   Diagnostic                                          
Date sent  . . . . . . :   11/10/16      Time sent  . . . . . . :   10:54:52   

Message . . . . :   Object ACB0500R is temporarily unavailable.                
Cause . . . . . :   A lock on object ACB0500R of type *SRVPGM in library       
  LMIQALIB is currently held by another job. The object is unavailable for use 
  at this time.                                                                
Recovery  . . . :   Try to access the object again.  If the object is still    
  locked, use the WRKOBJLCK command to determine which job holds the lock.   

您是否按照说明使用 WRKOBJLCK 命令来查看哪个作业锁定了 *SRVPGM?

在正常执行期间没有对 *SRVPGM 对象进行锁定。

*SRVPGM 或 *PGM 对象唯一一次被锁定

  1. Backup/Restore操作
  2. 程序员有意添加对象锁(通过 ALCOBJ 命令或 API),以防止多人在同一时间 运行 运行同一个程序。
  3. 如果 *SRVPGM/*PGM 当前正在 运行 调试另一个作业(也许?)
  4. 创作期间(也许?)

3 和 4 是有根据的猜测...我从未真正尝试过在这些过程中观察锁...

拿到锁后你想做什么?执行还是重新创建?