[SOLVED]:(FOC03730) Error on previously running maintains?
Hi,
We have a client that has a decent number of programs that use maintain for updating data tables, and a error/event log table we have.
Suddenly, many of these maintain sections are throwing the old "(FOC03730) :Non-NEXT access on non-keyed segment: is/are not supported in Maintain. " error message.
I have updated the code to use MODIFY in place of the MAINTAIN, but the client is pushing for a reason why this suddenly broke.
relevant bits of code:
MAINTAIN FILE SECREC AND EVENTL
COMPUTE TMP/I5=; TOT/D12=0;
INFER ID INTO TEMPSTACK1
PERFORM CASE1
CASE CASE1
CALL 725S INTO TEMPSTACK1
BEGIN
-* PERFORM LOGIT
PERFORM CASE2
GOTO CASE1
ENDBEGIN
ENDCASE
CASE LOGIT
INFER evenl.event INTO LOGSTACKJ
STACK CLEAR LOGSTACKJ
COMPUTE
TOT=TOT+TEMPSTACK1.FOCCOUNT;
MYTEST/A17='&&BATCH_START.EVAL';
LOGSTACKJ(1).DATETIME_STAMP=HGETC(8, DATETIME_STAMP);
LOGSTACKJ(1).USER_ID='&&USERID.EVAL';
LOGSTACKJ(1).BATCHID=&&BATCHID.EVAL;
LOGSTACKJ(1).FUNC_ID=&&FUNC_ID.EVAL;
LOGSTACKJ(1).ASOFDATE='&DAY.EVAL';
LOGSTACKJ(1).SEVERITY=0;
BSTART/HYYMDs=HINPUT(17,MYTEST,8,BSTART);
LOGSTACKJ(1).BATCH_START=BSTART;
LOGSTACKJ(1).EVENT='725A Updating through ' | TOT | ' for ' | '&DAY.EVAL';
IF TOT GT &TOTAL THEN GOTO EXIT;
IF TEMPSTACK1.FOCCOUNT EQ 0 THEN GOTO EXIT;
FOR 1 INCLUDE EVENT FROM LOGSTACKJ(1)
ENDCASE
CASE LOGERROR
INFER frpevent.event INTO LOGSTACKER
STACK CLEAR LOGSTACKER
COMPUTE
MYTESTA/A17='&&BATCH_START.EVAL';
LOGSTACKER(1).DATETIME_STAMP=HGETC(8, DATETIME_STAMP);
LOGSTACKER(1).USER_ID='&&USERID.EVAL';
LOGSTACKER(1).BATCHID=&&BATCHID.EVAL;
LOGSTACKER(1).FUNC_ID=&&FUNC_ID.EVAL;
LOGSTACKER(1).ASOFDATE='&DAY.EVAL';
LOGSTACKER(1).SEVERITY=1;
BSTARTA/HYYMDs=HINPUT(17,MYTESTA,8,BSTART);
LOGSTACKER(1).BATCH_START=BSTARTA;
LOGSTACKER(1).EVENT='Error Loading ' | TEMPSTACK1(TMP).ID;
FOR 1 INCLUDE EVENT FROM LOGSTACKER(1)
ENDCASE
CASE CASE2
REPEAT TEMPSTACK1.FOCCOUNT TMP=1;
COMPUTE ID=TEMPSTACK1(TMP).ID;
MATCH SECREC.ID
ON MATCH BEGIN
FOR 1 UPDATE
NAME1 NAME2 DESC
FROM TEMPSTACK1(TMP)
ENDBEGIN
ON NOMATCH BEGIN
FOR 1 INCLUDE SECREC.ID FROM TEMPSTACK1(TMP)
ENDBEGIN
IF FocError NE 0 BEGIN
PERFORM LOGERROR;
ENDBEGIN
ENDREPEAT TMP=TMP+1;
ENDCASE
END
-RUN
The error happens on this line:
FOR 1 INCLUDE EVENT FROM LOGSTACKJ(1)
If I comment out the logging, the rest runs fine.... Any thoughts or help figuring out what might be causing this now is greatly appreciated!
Thanks, KThis message has been edited. Last edited by: Kwest,
WebFOCUS 7.6 - Windows Output formats: HTML, Excel 2000, PDF, Active HTML
July 15, 2015, 01:21 PM
Francis Mariani
Did the WebFOCUS metadata change? Perhaps someone refreshed the master and access files...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
July 15, 2015, 02:41 PM
Kwest
Hi Francis,
Thanks. Yes I actually just got an update from our DBA and he says that they removed the primary keys and uniqueness constraints from the database due to servers being more powerful and trying to insert the same datetimestamp. Now we just index the key fields.
I am guessing the Logging did not like the non-keyed data.
I think this will satisfy my users question. At least for now!
Thanks, Kent
WebFOCUS 7.6 - Windows Output formats: HTML, Excel 2000, PDF, Active HTML
July 15, 2015, 02:43 PM
Francis Mariani
quote:
(FOC03730) :Non-NEXT access on non-keyed segment: is/are not supported in Maintain.
I thought that would be the issue.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server