Hi People
An Acu4GL START, we populate the where clause unconditionally
effectively the where clause built is :
INTEGLOG_STATUS = 'C' AND INTEGLOG_SYSTEM = 'EDMS'
We are running a single thread and therefore have not felt the need to wrap LOCK THREAD and UNLOCK THREAD around the START as we have in many other cases.
This process runs daily and has twice failed on the START with 9D156.
Would wrapping LOCK THREAD, UNLOACK THREAD around the START provide any protection?
Full body of code is .....
MOVE 0 TO WS-COUNT-1
MOVE "EDMS" TO POSINTEGLOG-SYSTEM.
IF WS-STATUS NOT = "00"
EXIT PARAGRAPH
END-IF.
*------------------------------------------
START-INTEGLOG-STATUS-SYSTEM-KEY.
*------------------------------------------
PERFORM SETUP-WHERE-CL-4-STATUS-SYSTEM-KEY.
START INTEGRATION-LOG KEY NOT < INTEGLOG-STATUS-SYSTEM-KEY
INVALID KEY
MOVE "92" TO WS-STATUS.
MOVE LOW-VALUES TO A4GL_WHERE_CONSTRAINT.
*------------------------------------------
SETUP-WHERE-CL-4-STATUS-SYSTEM-KEY SECTION.
*------------------------------------------
* this sets up the where clause
IF POSINTEGLOG-STATUS = SPACE OR LOW-VALUES OR HIGH-VALUES OR ZERO
MOVE LOW-VALUES TO A4GL_WHERE_CONSTRAINT
ELSE
MOVE SPACE TO A4GL_WHERE_CONSTRAINT
MOVE 1 TO WS-4GL-STR-PTR
STRING
"INTEGLOG_STATUS = '"
POSINTEGLOG-STATUS
"'"
DELIMITED BY SIZE
INTO A4GL_WHERE_CONSTRAINT
WITH POINTER WS-4GL-STR-PTR
END-STRING
IF POSINTEGLOG-SYSTEM = SPACE OR LOW-VALUES OR HIGH-VALUES OR ZERO
CONTINUE
ELSE
STRING
" AND "
"INTEGLOG_SYSTEM = '"
POSINTEGLOG-SYSTEM
"'"
DELIMITED BY SIZE
INTO A4GL_WHERE_CONSTRAINT
WITH POINTER WS-4GL-STR-PTR
END-STRING
END-IF
INSPECT A4GL_WHERE_CONSTRAINT REPLACING TRAILING SPACES BY
LOW-VALUES
END-IF.