我需要第二双眼睛,这是一个通过程序运行的包,并从与程序中的屏幕无关的表中获取值。当我运行编译器时,出现以下错误,并且我看不到哪里缺少结束语句。
PACKAGE BODY UIMSMGR.NMGC_CTRGLCL_DB 的编译错误
错误:PLS-00103:在预期以下情况之一时遇到符号“异常”:
( begin case declare else elsif end exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << continue close current delete fetch lock
insert open rollback savepoint set sql execute commit forall
merge pipe purge json_exists json_value json_query
json_object json_array
线路:457 文本:异常
错误:PLS-00103:在预期以下情况之一时遇到符号“PROCEDURE”:
end not pragma final instantiable persistable order
overriding static member constructor map
The symbol "static" was substituted for "PROCEDURE" to continue.
这是我的代码:
Procedure GLCodecontrol (p_action IN VARCHAR2,
p_data IN CLOB,
p_languageCode IN VARCHAR2 DEFAULT 'ENG',
p_statusInd OUT VARCHAR2,
p_messageJSON OUT CLOB,
p_returnFieldsJSON OUT CLOB ) AS
--processMessage variables
d_messageRec U$_OL_Messages_DB.applicationMessage_Record_Type;
d_msgTypeErrorExists BOOLEAN := FALSE;
d_languageCode VARCHAR2(10) := NVL(p_languageCode, 'ENG');
--validation variables
d_propertyKey VARCHAR2(30);
missingColData EXCEPTION;
columnDataError EXCEPTION;
d_tableIndex BINARY_INTEGER;
d_rowID VARCHAR2(30);
d_psKey VARCHAR2(30);
d_REV_IND UTRACCT_REV_IND%TYPE;
d_SVC_CLASS UTRACCT_A_SERV_CLASS%TYPE;
d_SVC_CLASSB UTRACCT_B_SERV_CLASS%TYPE;
d_REV_LOCA UTRACCT_A_PREM_LOC%TYPE;
d_REV_LOCB UTRACCT_B_PREM_LOC%TYPE;
d_CUST_COUNT UTRACCT_A_CUST_COUNT%TYPE;
d_CUST_COUNTB UTRACCT_B_CUST_COUNT%TYPE;
d_RPT_CONS UTRACCT_A_REP_CON%TYPE;
d_RPT_CONSB UTRACCT_B_REP_CON %TYPE;
d_ACT_SVC UTRACCT_A_ASVC%TYPE;
d_ACT_SVCB UTRACCT_B_ASVC%TYPE;
d_errorMsg VARCHAR2(80);
RC_INTO_TMP VARCHAR2(20);
d_GLCLASS_CODE VARCHAR2(20);
d_procName VARCHAR2(100) := 'GLCODEcontrol';
d_GLCLASS_CODEb VARCHAR2(20);
p_REV_IND VARCHAR2 (10);
p_svc_class VARCHAR2 (10);
p_svc_classb VARCHAR2 (10);
p_rev_loca VARCHAR2 (10);
p_rev_locb VARCHAR2 (10);
p_cust_count VARCHAR2 (10);
p_cust_countb VARCHAR2 (10);
p_rpt_cons VARCHAR2 (10);
p_rpt_consb VARCHAR2 (10);
p_act_svc VARCHAR2 (10);
p_act_svcb VARCHAR2 (10);
p_act_a VARCHAR2 (10);
p_act_B VARCHAR2 (10);
CURSOR UTRACCT_accountA_Cursor IS
SELECT UTRACCT_ACCOUNT_A
FROM UTRACCT
WHERE UTRACCT_GLCL_CODE = d_GLCLASS_CODE;
CURSOR UTRACCT_accountB_Cursor IS
SELECT UTRACCT_ACCOUNT_B
FROM UTRACCT
WHERE UTRACCT_GLCL_CODE = d_GLCLASS_CODE;
CURSOR rev_IND_Cursor IS
SELECT UTRACCT_REV_IND
FROM UTRACCT
WHERE UTRACCT_GLCL_CODE = d_GLCLASS_CODE;
CURSOR Serv_Class_A_Cursor IS
SELECT UTRACCT_A_SERV_CLASS
FROM UTRACCT
WHERE UTRACCT_GLCL_CODE = d_GLCLASS_CODE and UTRACCT_GLCL_code = p_act_a;
CURSOR Serv_Class_B_Cursor IS
SELECT UTRACCT_B_SERV_CLASS
FROM UTRACCT
WHERE UTRACCT_GLCL_CODE = d_GLCLASS_CODEb and UTRACCT_GLCL_code = p_act_B;
CURSOR REV_LOC_A_Cursor IS
SELECT UTRACCT_A_PREM_LOC
FROM UTRACCT
WHERE UTRACCT_GLCL_CODE = d_GLCLASS_CODE and UTRACCT_GLCL_code = p_act_a;
CURSOR REV_LOC_B_Cursor IS
SELECT UTRACCT_B_PREM_LOC
FROM UTRACCT
WHERE UTRACCT_GLCL_CODE = d_GLCLASS_CODEb and UTRACCT_GLCL_code = p_act_B;
CURSOR CUST_COUNT_A_Cursor IS
SELECT UTRACCT_A_CUST_COUNT
FROM UTRACCT
WHERE UTRACCT_GLCL_CODE = d_GLCLASS_CODE and UTRACCT_GLCL_code = p_act_a;
CURSOR CUST_COUNT_B_CURSOR IS
SELECT UTRACCT_B_CUST_COUNT
FROM UTRACCT
WHERE UTRACCT_GLCL_CODE = d_GLCLASS_CODEb and UTRACCT_GLCL_code = p_act_B;
CURSOR RPT_CONS_CURSOR IS
SELECT UTRACCT_A_REP_CON
FROM UTRACCT
WHERE UTRACCT_GLCL_CODE = d_GLCLASS_CODE and UTRACCT_GLCL_code = p_act_a;
CURSOR RPT_CONS_B_CURSOR IS
SELECT UTRACCT_B_CUST_COUNT
FROM UTRACCT
WHERE UTRACCT_GLCL_CODE = d_GLCLASS_CODEb and UTRACCT_GLCL_code = p_act_B;
CURSOR ACT_SVC_CURSOR IS
SELECT UTRACCT_A_ASVC
FROM UTRACCT
WHERE UTRACCT_GLCL_CODE = d_GLCLASS_CODE and UTRACCT_GLCL_code = p_act_a;
CURSOR ACT_SVCB_CURSOR IS
SELECT UTRACCT_B_ASVC
FROM UTRACCT
WHERE UTRACCT_GLCL_CODE = d_GLCLASS_CODEb and UTRACCT_GLCL_code = p_act_B;
BEGIN
p_statusInd := 'P';
IF U$_OL_PROPERTY_DB.calledFromProcessDML THEN
d_tableIndex := U$_OL_PROPERTY_DB.currentTableIndex;
ELSE
d_tableIndex := U$_OL_PROPERTY_DB.buildtableRows(p_data);
END IF;
d_rowid := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).tableRowid;
d_psKey := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertySetKey;
BEGIN
d_propertyKey := UTRGLCL_CODE;
IF U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey.EXISTS(d_propertyKey) THEN
d_GLCLASS_CODE := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey(d_propertyKey).value;
ELSE
d_GLCLASS_CODE := NULL;
END IF;
d_propertyKey := UTRGLCL_CODE;
IF U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey.EXISTS(d_propertyKey) THEN
d_GLCLASS_CODEb := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey(d_propertyKey).value;
ELSE
d_GLCLASS_CODEb := NULL;
END IF;
d_propertyKey := UTRACCT_REV_IND;
IF U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey.EXISTS(d_propertyKey) THEN
d_REV_IND := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey(d_propertyKey).value;
ELSE
d_REV_IND := NULL;
END IF;
d_propertyKey := UTRACCT_A_SERV_CLASS;
IF U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey.EXISTS(d_propertyKey) THEN
d_SVC_CLASS := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey(d_propertyKey).value;
ELSE
d_svc_class := NULL;
END IF;
d_propertyKey := UTRACCT_B_SERV_CLASS;
IF U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey.EXISTS(d_propertyKey) THEN
d_svc_classb := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey(d_propertyKey).value;
ELSE
d_svc_classb := NULL;
END IF;
d_propertyKey := UTRACCT_A_PREM_LOC;
IF U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey.EXISTS(d_propertyKey) THEN
d_rev_loca := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey(d_propertyKey).value;
ELSE
d_rev_loca := NULL;
END IF;
d_propertyKey := UTRACCT_B_PREM_LOC;
IF U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey.EXISTS(d_propertyKey) THEN
d_rev_locb := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey(d_propertyKey).value;
ELSE
d_rev_locb := NULL;
END IF;
d_propertyKey := UTRACCT_A_CUST_COUNT;
IF U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey.EXISTS(d_propertyKey) THEN
d_CUST_COUNT := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey(d_propertyKey).value;
ELSE
d_CUST_COUNT := NULL;
END IF;
d_propertyKey := UTRACCT_B_CUST_COUNT;
IF U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey.EXISTS(d_propertyKey) THEN
d_CUST_COUNTB := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey(d_propertyKey).value;
ELSE
d_CUST_COUNTB := NULL;
END IF;
d_propertyKey := UTRACCT_A_REP_CON;
IF U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey.EXISTS(d_propertyKey) THEN
d_RPT_CONS := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey(d_propertyKey).value;
ELSE
d_RPT_CONS := NULL;
END IF;
d_propertyKey := UTRACCT_B_REP_CON;
IF U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey.EXISTS(d_propertyKey) THEN
d_RPT_CONSB := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey(d_propertyKey).value;
ELSE
d_RPT_CONSB := NULL;
END IF;
d_propertyKey := UTRACCT_A_ASVC;
IF U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey.EXISTS(d_propertyKey) THEN
d_ACT_SVC := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey(d_propertyKey).value;
ELSE
d_ACT_SVC := NULL;
END IF;
d_propertyKey := UTRACCT_B_ASVC;
IF U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey.EXISTS(d_propertyKey) THEN
d_ACT_SVCB := U$_OL_PROPERTY_DB.tableRow(d_tableIndex).propertyKey(d_propertyKey).value;
ELSE
d_ACT_SVCB := NULL;
END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RAISE missingColData;
WHEN OTHERS THEN
RAISE columnDataError;
END;
--Pulling UTRACCT into varriable for CTRGLCL screen;
--Fetch varriables via cursor
IF d_GLCLASS_CODE IS NOT NULL THEN
OPEN UTRACCT_accountA_Cursor;
FETCH UTRACCT_accountA_Cursor INTO p_act_a;
CLOSE UTRACCT_accountA_Cursor;
IF d_GLCLASS_CODEb IS NOT NULL THEN
OPEN UTRACCT_accountB_Cursor;
FETCH UTRACCT_accountB_Cursor INTO p_act_B;
CLOSE UTRACCT_accountB_Cursor;
IF d_REV_IND IS NOT NULL THEN
OPEN rev_IND_Cursor;
FETCH rev_IND_Cursor INTO p_REV_IND;
CLOSE rev_IND_Cursor;
IF d_SVC_CLASS IS NOT NULL THEN
OPEN Serv_Class_A_Cursor;
FETCH Serv_Class_A_Cursor INTO p_svc_class;
CLOSE Serv_Class_A_Cursor;
IF d_SVC_CLASSB IS NOT NULL THEN
OPEN Serv_Class_B_Cursor;
FETCH Serv_Class_B_Cursor INTO p_svc_classb;
CLOSE Serv_Class_B_Cursor;
IF d_REV_LOCA IS NOT NULL THEN
OPEN REV_LOC_A_Cursor;
FETCH REV_LOC_A_Cursor INTO p_rev_loca;
CLOSE REV_LOC_A_Cursor;
IF d_REV_LOCB IS NOT NULL THEN
OPEN REV_LOC_B_Cursor;
FETCH REV_LOC_B_Cursor INTO p_rev_locb;
CLOSE REV_LOC_B_Cursor;
IF d_CUST_COUNT IS NOT NULL THEN
OPEN CUST_COUNT_A_Cursor;
FETCH CUST_COUNT_A_Cursor INTO p_cust_count;
CLOSE CUST_COUNT_A_Cursor;
IF d_CUST_COUNTB IS NOT NULL THEN
OPEN CUST_COUNT_B_CURSOR;
FETCH CUST_COUNT_B_CURSOR INTO p_cust_countb;
CLOSE CUST_COUNT_B_CURSOR;
IF d_RPT_CONS IS NOT NULL THEN
OPEN RPT_CONS_CURSOR;
FETCH RPT_CONS_CURSOR INTO p_rpt_cons;
CLOSE RPT_CONS_CURSOR;
IF d_RPT_CONSB IS NOT NULL THEN
OPEN RPT_CONS_B_CURSOR;
FETCH RPT_CONS_B_CURSOR INTO p_rpt_consb;
CLOSE RPT_CONS_B_CURSOR;
IF d_ACT_SVC IS NOT NULL THEN
OPEN ACT_SVC_CURSOR;
FETCH ACT_SVC_CURSOR INTO p_act_svc;
CLOSE ACT_SVC_CURSOR;
IF d_ACT_SVCB IS NOT NULL THEN
OPEN RPT_CONS_B_CURSOR;
FETCH RPT_CONS_B_CURSOR INTO p_act_svcb;
CLOSE RPT_CONS_B_CURSOR;
d_propertyKey := REV_IND;
U$_OL_PROPERTY_DB.addReturnField(d_psKey, d_propertyKey, d_rowid, p_REV_IND, TRUE, 'N', 'N');
d_propertyKey := SVC_CLASS;
U$_OL_PROPERTY_DB.addReturnField(d_psKey, d_propertyKey, d_rowid, p_svc_class, TRUE, 'N', 'N');
d_propertyKey := SVC_CLASSB;
U$_OL_PROPERTY_DB.addReturnField(d_psKey, d_propertyKey, d_rowid, p_svc_classb, TRUE, 'N', 'N');
d_propertyKey := REV_LOCA;
U$_OL_PROPERTY_DB.addReturnField(d_psKey, d_propertyKey, d_rowid, p_rev_loca, TRUE, 'N', 'N');
d_propertyKey := REV_LOCB;
U$_OL_PROPERTY_DB.addReturnField(d_psKey, d_propertyKey, d_rowid, p_rev_locb, TRUE, 'N', 'N');
d_propertyKey := CUST_COUNT;
U$_OL_PROPERTY_DB.addReturnField(d_psKey, d_propertyKey, d_rowid, p_cust_count, TRUE, 'N', 'N');
d_propertyKey := CUST_COUNTB;
U$_OL_PROPERTY_DB.addReturnField(d_psKey, d_propertyKey, d_rowid, p_cust_countb, TRUE, 'N', 'N');
d_propertyKey := RPT_CONS;
U$_OL_PROPERTY_DB.addReturnField(d_psKey, d_propertyKey, d_rowid, p_rpt_cons, TRUE, 'N', 'N');
d_propertyKey := RPT_CONSB;
U$_OL_PROPERTY_DB.addReturnField(d_psKey, d_propertyKey, d_rowid, p_rpt_consb, TRUE, 'N', 'N');
d_propertyKey := ACT_SVC;
U$_OL_PROPERTY_DB.addReturnField(d_psKey, d_propertyKey, d_rowid, d_utilityTotal, TRUE, 'N', 'N');
d_propertyKey := ACT_SVCB;
U$_OL_PROPERTY_DB.addReturnField(d_psKey, d_propertyKey, d_rowid, d_utilityTotal, TRUE, 'N', 'N');
-- set the return JSONs and status
U$_OL_Messages_DB.getMessageJSON(p_messageJSON);
U$_OL_PROPERTY_DB.getReturnFieldsJSON(p_returnFieldsJSON);
IF d_msgTypeErrorExists THEN
p_statusInd := 'F';
END IF;
EXCEPTION
WHEN missingColData THEN
p_statusInd := 'F';
-- No data found for <P1>
U$_OL_Messages_DB.processMessage('CIS-4810', d_messageRec, d_msgTypeErrorExists, d_languageCode, d_propertyKey, d_propertyKey);
U$_OL_Messages_DB.getMessageJSON(p_messageJSON);
U$_OL_PROPERTY_DB.getReturnFieldsJSON(p_returnFieldsJSON);
logMessage('GLCodecontrol', 'No data found for ' || d_propertyKey);
WHEN columnDataError THEN
p_statusInd := 'F';
-- Data error for <P1>
U$_OL_Messages_DB.processMessage('CIS-4811', d_messageRec, d_msgTypeErrorExists, d_languageCode, d_propertyKey, d_propertyKey);
U$_OL_Messages_DB.getMessageJSON(p_messageJSON);
U$_OL_PROPERTY_DB.getReturnFieldsJSON(p_returnFieldsJSON);
logMessage('GLCodecontrol', 'Data error for ' || d_propertyKey);
WHEN OTHERS THEN
p_statusInd := 'F';
-- Database error: <P1>
U$_OL_Messages_DB.processMessage('CIS-4800', d_messageRec, d_msgTypeErrorExists, d_languageCode, d_propertyKey, SQLERRM);
U$_OL_Messages_DB.getMessageJSON(p_messageJSON);
U$_OL_PROPERTY_DB.getReturnFieldsJSON(p_returnFieldsJSON);
logMessage('GLCodecontrol', SQLERRM);
END GLCodecontrol;
寻找我错过的公开声明。
IF d_GLCLASS_CODE IS NOT NULL THEN
OPEN UTRACCT_accountA_Cursor;
FETCH UTRACCT_accountA_Cursor INTO p_act_a;
CLOSE UTRACCT_accountA_Cursor;
IF d_GLCLASS_CODEb IS NOT NULL THEN
OPEN UTRACCT_accountB_Cursor;
FETCH UTRACCT_accountB_Cursor INTO p_act_B;
CLOSE UTRACCT_accountB_Cursor;
. . . etc.
这些
IF
语句缺少 END IF;
终止。