Home » Infrastructure » Other Operating Systems » ProCobol ORA-0101 Invalid Cursor Error
ProCobol ORA-0101 Invalid Cursor Error [message #45187] |
Fri, 20 February 2004 05:22 |
Thomas Sullivan
Messages: 1 Registered: February 2004
|
Junior Member |
|
|
HI,
need assistance -
I'm using the ProCobol product within a CICS region to access data from an oracle server.
I'm encountering an Invalid cursor error during a standard fetch routine within an application module. Problem is that this logic works fine in 2 subsequent oracle testing regions but not in its current instance. I'm not an expert using this product and am unsure of what external factors could be attributed to this condition. I'm hoping that I am just missing a simplistic setup attribute. I have not altered any precompile settings such as the MAXCURSOR or areasize parameters
I would appreciate all and any assitance provided. Currently at a critical pre-go-live testing phase . thanks
Sample Code:
EXEC SQL DECLARE BILLFORMATCURSOR CURSOR FOR
SELECT E.SETID,
E.CUST_ID,
E.CUST_NAME,
E.CORPORATE_SETID,
E.CORPORATE_CUST_ID,
TO_CHAR(E.ML_CUST_CANC_DT,'YYYYMMDD'),
TO_CHAR(E.ML_ORIG_EFF_DT,'YYYYMMDD'),
E.ML_ZONE,
E.ML_ADM_TEAM,
B.ML_BI_FMT_CD,
B.ML_BI_FMT_NM,
B.ML_BI_FMT_STAT_CD,
B.ML_BI_LOCK_BOX_CD,
TO_CHAR(B.EFFDT,'YYYYMMDD'),
TO_CHAR(B.ML_BI_CANC_DT,'YYYYMMDD'),
TO_CHAR(B.ML_BI_ORIG_EFF_DT,'YYYYMMDD'),
B.ML_BI_FMT_TYP_CD,
B.BILL_CYCLE_ID, B.BI_CURRENCY_CD,
B.ML_BI_TRNARND_CD
FROM PS_ML_CUSTOMER E,
PS_ML_BI_FORMAT B
WHERE E.SETID = 'MLGRP'
AND E.CORPORATE_CUST_ID = :CORPORATE-CUST-ID
AND E.EFFDT =
(SELECT MAX(EFFDT) FROM PS_ML_CUSTOMER
WHERE SETID = E.SETID
AND CUST_ID = E.CUST_ID)
AND E.EFFSEQ =
(SELECT MAX(EFFSEQ) FROM PS_ML_CUSTOMER
WHERE SETID = E.SETID
AND CUST_ID = E.CUST_ID
AND EFFDT = E.EFFDT)
AND B.SETID = E.SETID
AND B.CUST_ID = E.CUST_ID
AND (TO_CHAR(ML_BI_CANC_DT,'YYYYMMDD')
> :DDF-FIRST-DUE-DT-S
OR B.ML_BI_CANC_DT IS NULL)
AND (TO_CHAR(B.ML_BI_CANC_DT,'YYYYMMDD')
> :DDF-FIRST-DUE-DT-S
OR B.ML_BI_CANC_DT IS NULL)
AND B.EFFDT =
(SELECT MAX(EFFDT) FROM PS_ML_BI_FORMAT
WHERE SETID = B.SETID
AND CUST_ID = B.CUST_ID
AND ML_BI_FMT_CD = B.ML_BI_FMT_CD)
AND B.EFFSEQ =
(SELECT MAX(EFFSEQ) FROM PS_ML_BI_FORMAT
WHERE SETID = B.SETID
AND CUST_ID = B.CUST_ID
AND ML_BI_FMT_CD = B.ML_BI_FMT_CD
AND EFFDT = B.EFFDT)
END-EXEC
EXEC SQL OPEN BILLFORMATCURSOR END-EXEC
PERFORM B1-FETCH-BILLFORMAT
UNTIL END-OF-CUSTOMER
OR NOT REQ-OK
EXEC SQL CLOSE BILLFORMATCURSOR END-EXEC
EXEC SQL COMMIT WORK RELEASE END-EXEC
** Actual Fetch routine
B1-FETCH-BILLFORMAT.
EXEC SQL WHENEVER NOT FOUND
DO PERFORM X1-SET-END-OF-CUSTOMER-SWITCH
END-EXEC
EXEC SQL
FETCH BILLFORMATCURSOR
INTO :SETID,
:CUST-ID,
:CUST-NAME,
:CORPORATE-SETID,
:CORPORATE-CUST-ID,
:ML-CUST-CANC-DT:ML-CUST-CANC-DT-IND,
:ML-ORIG-EFF-DT:ML-ORIG-EFF-DT-IND,
:ML-ZONE,
:ML-ADM-TEAM,
:ML-BI-FMT-CD,
:ML-BI-FMT-NM,
:ML-BI-FMT-STAT-CD,
:ML-BI-LOCK-BOX-CD,
:EFFDT:EFFDT-IND,
:ML-BI-CANC-DT:ML-BI-CANC-DT-IND,
:ML-BI-ORIG-EFF-DT:ML-BI-ORIG-EFF-DT-IND,
:ML-BI-FMT-TYP-CD,
:BILL-CYCLE-ID,
:BI-CURRENCY-CD,
:ML-BI-TRNARND-CD
END-EXEC
|
|
|
Goto Forum:
Current Time: Wed Jan 22 05:23:25 CST 2025
|