Below is the IMS program I got the IMS status code 'AD':
01 Â FUNCTION-CODES.
      05 GN-FUNC  PIC X(4) VALUE 'GN  '.
. . .
    01 DBDB-SSA-UNQUAL.
      05 FILLER   PIC X(08) VALUE 'SEGROOT'.
      05 FILLER   PIC X VALUE SPACES.
    LINKAGE SECTION.
    01 DUMMY-IO-PCB-MASK.
      05 FILLER PIC X(10).
      05 DUMMY-IO-STATUS PIC XX.
    01 DATABASE-PCB-MASK.
      05 DBD-NAME        PIC X(8).
      05 SEG-LEVEL       PIC X(2).
      05 DATABASE-STATUS    PIC X(2).
      05 PROC-OPTIONS      PIC X(4).
      05 WS-RESERVED      PIC S9(5) COMP.
      05 SEGMENT-NAME-FEEDBACK PIC X(8).
      05 LENGTH-KEY-FEEDBACK  PIC S9(5) COMP.
      05 NUM-SENS-SEGS     PIC S9(5) COMP.
      05 KEY-FEEDBACK      PIC X(256).
    PROCEDURE DIVISION USING DUMMY-IO-PCB-MASK,
                 DATABASE-PCB-MASK.
      ENTRY 'DLITCBL' USING DATABASE-PCB-MASK.
      MOVE 'DBDBTEST'  TO DBD-NAME
      MOVE '01'     TO SEG-LEVEL
      CALL 'CBLTDLI' USING
             GN-FUNC
             DATABASE-PCB-MASK
             WS-IO-RECORD
             DBDB-SSA-UNQUAL
. . .
      05 GN-FUNC  PIC X(4) VALUE 'GN  '.
. . .
    01 DBDB-SSA-UNQUAL.
      05 FILLER   PIC X(08) VALUE 'SEGROOT'.
      05 FILLER   PIC X VALUE SPACES.
    LINKAGE SECTION.
    01 DUMMY-IO-PCB-MASK.
      05 FILLER PIC X(10).
      05 DUMMY-IO-STATUS PIC XX.
    01 DATABASE-PCB-MASK.
      05 DBD-NAME        PIC X(8).
      05 SEG-LEVEL       PIC X(2).
      05 DATABASE-STATUS    PIC X(2).
      05 PROC-OPTIONS      PIC X(4).
      05 WS-RESERVED      PIC S9(5) COMP.
      05 SEGMENT-NAME-FEEDBACK PIC X(8).
      05 LENGTH-KEY-FEEDBACK  PIC S9(5) COMP.
      05 NUM-SENS-SEGS     PIC S9(5) COMP.
      05 KEY-FEEDBACK      PIC X(256).
    PROCEDURE DIVISION USING DUMMY-IO-PCB-MASK,
                 DATABASE-PCB-MASK.
      ENTRY 'DLITCBL' USING DATABASE-PCB-MASK.
      MOVE 'DBDBTEST'  TO DBD-NAME
      MOVE '01'     TO SEG-LEVEL
      CALL 'CBLTDLI' USING
             GN-FUNC
             DATABASE-PCB-MASK
             WS-IO-RECORD
             DBDB-SSA-UNQUAL
. . .
I could not figure it out what's causing the status code 'AD' (the IMS manual says it's caused by invalid function parameter), could anyone help?
Thanks, Roy