IFBO .ccp program's CURSOR-DATA-## occurs not big enough, abend occurs

It appears that IFBO .ccp programs accessing a .csm subroutine that orders data using GEN_ARG, must have a large enough CURSOR-DATA-## to hold all of the data from one retrieval.

This was fixed by expanding the CURSOR-DATA-## occurs to the maximum value such that the record_size * max_occurs < 8000 (from the definition of CURSOR-DATA-01).

It is not known how to fix this problem if the amount of data would be > 8000. Do not know if 8000 is known to the Asset Suite architecture.

Example from a Work Order Read request. This is the error recorded in tiglstn.out. IFBO returns the same error in the reply XML.

TIGAPIBW: INT-REQUEST-ID: 200911300936558391491341697 REQUEST-SEGMENTS: 000002
TIGAPIBW: INT-REQUEST-ID: 200911300936558391491341697 BUSINESS-OBJECT: WorkOrder
TIGAPIBW: INT-REQUEST-ID: 200911300936558391491341697 BUS-OBJECT-METHOD: Read
TIGAPIBW: INT-REQUEST-ID: 200911300936558391491341697 EXT-SYSTEM-ID:
TIGAPIAB: FATAL ERROR DETECTED IN PROGRAM: TIGCURS , PARAGRAPH: ????- , RETURN CODE: 9999

TIGAPIAB: LINK STACK: TIGSERV TIGAPIBW AFGWORDR AFGWORED TIGCURS

TIGAPIAB: TIGCURS: CM9030-DB-CDB-MISMATCH.EXPECTED INSERT LINE

TIGAPIAB: DATA PROBABLY NOT SORTED UNIQUELY WITHIN THE CURSOR

TIGAPIAB: OR ANOTHER TASK HAS ALTERED A PAGE VIEWED BY THE

TIGAPIAB: CURRENT TASK (CONCURRENT UPDATE PROBLEM).

TIGAPIAB: STACK: ^E ^E ^E TIGCURS WOSUM

TIGAPIAB: INT-REQUEST-ID: 200911300936558391491341697 REPLY-SEGMENTS: 000000
TIGAPIAB: INT-REQUEST-ID: 200911300936558391491341697 MESSAGES: Y
TIGAPIAB: INT-REQUEST-ID: 200911300936558391491341697 RETURN-CODE: 9999
TIGAPIAB: INT-REQUEST-ID: 200911300936558391491341697 END-TIME: 11/30/2009 09:36:59.93
11/30/2009 09:37:00.287952, IFBOWS, End PA04 Txntime 4.071667 sec, pid 287001

The abend shows a problem accessing data accessed by subroutine WOSUM, i.e., tigwosum.csm. The fix was to change afgwored.ccp:

*CUST Begin

* 05 LINE-MAX-WOSUM PIC S9(04) COMP VALUE 10.
05 LINE-MAX-WOSUM PIC S9(04) COMP VALUE 90.

*CUST end

*CUST Begin

* 02 WOSUM-DATA OCCURS 1 TO 10 TIMES
02 WOSUM-DATA OCCURS 1 TO 90 TIMES

*CUST end