从 COBOL mainprog 调用 COBOL/DB2 subprog returns subprog 的编译单元出现 CEE3204S 错误

Calling COBOL/DB2 subprog from COBOL mainprog returns a CEE3204S error from compile unit of subprog

我正在尝试从 COBOL mainprog 调用 COBOL/DB2 子程序。但是当运行时,它returns这个错误:

CEE3204S The system detected a protection exception (System Completion Code=0C4).
From compile unit ABCDBQUE...

下面是我从 mainprog 调用 subprog 的方式:

       01  WS-HOST-VARIABLES.
           05 WS-ACCT-NO.
              10 WS-REGN-CODE            PIC X(04).
              10 WS-BRANCH-CODE          PIC X(04).
              10 WS-ACCOUNT-NO           PIC X(08).
           05 WS-HOST-ACCT-NO            PIC X(16).
           05 WS-ACCT-STATUS.
              10 WS-DORMANT-STATUS       PIC X(03) VALUE '002'.
              10 WS-CLOSED-STATUS        PIC X(03) VALUE '004'.
       01  WS-DB-QUERY                   PIC X(20).
       01  WS-DB-QUERY-STATUS            PIC X(01).
           88 DB-QUERY-SUCCEEDED         VALUE 'S'.
           88 DB-QUERY-FAILED            VALUE 'F'.
..........
       01  WS-PRT-LINE3.
           05 FILLER                     PIC X(10) VALUE ' REGION:  '.
           05 WS-PRT-REGION-NAME         PIC X(70).
       01  WS-PRT-LINE4.
           05 FILLER                     PIC X(10) VALUE ' BRANCH:  '.
           05 WS-PRT-BRANCH-NAME         PIC X(70).
..........
       0810-GET-REGION-AND-BRANCH.
           MOVE 'GET REGION BRANCH' TO WS-DB-QUERY
           CALL 'ABCDBQUE' USING WS-DB-QUERY
                                 WS-DB-QUERY-STATUS 
                                 WS-REGN-CODE 
                                 WS-BRANCH-CODE 
                                 WS-ACCOUNT-NO 
                                 WS-PRT-REGION-NAME
                                 WS-PRT-BRANCH-NAME.
           EVALUATE TRUE 
               WHEN DB-QUERY-SUCCEEDED
                    DISPLAY 'GET REGION BRANCH SUCCEEDED'
               WHEN DB-QUERY-FAILED
                    DISPLAY 'GET REGION BRANCH FAILED'
           END-EVALUATE.

这是我的子程序的样子:

       WORKING-STORAGE SECTION.
............
      *
       LINKAGE SECTION. 
       01  LS-DB-QUERY                   PIC X(20).
           88 DB-SELECT-ACCT             VALUE 'INQUIRE DEPTABLE'.
           88 DB-SELECT-REG-BRANCH       VALUE 'GET REGION BRANCH'.
           88 DB-UPDATE                  VALUE 'ACCT STATUS UPDATE'.
       01  LS-DB-QUERY-STATUS            PIC X(01).
           88 DB-QUERY-SUCCEEDED         VALUE 'S'.
           88 DB-QUERY-FAILED            VALUE 'F'.
       01  LS-ACCT-NO.
           05 LS-REGN-CODE               PIC X(04).
           05 LS-BRANCH-CODE             PIC X(04).
           05 LS-ACCOUNT-NO              PIC X(08).
       01  LS-PRT-REGION-NAME            PIC X(70).
       01  LS-PRT-BRANCH-NAME            PIC X(70).
      *
       PROCEDURE DIVISION USING LS-DB-QUERY, 
                                LS-DB-QUERY-STATUS,
                                LS-ACCT-NO,
                                LS-PRT-REGION-NAME,
                                LS-PRT-BRANCH-NAME.
..........

Return编译两个程序的代码都是0。当我没有将subprog与mainprog分开时,它可以成功运行。但是当我开始添加这个静态调用功能时失败了。

CALL 上,您传递了 7 个参数,但您只有 USING 5 个 - 这是行不通的。调用程序和被调用程序中的参数列表必须完全匹配。