Focal Point
MAINTAIN, ORACLE TABLE

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8571009331

October 17, 2005, 10:25 AM
joan_c
MAINTAIN, ORACLE TABLE
Hi
________________________________________________
Attempt to update the numeric fields on a oracle table, is always are left me to zero. On the contrary the alphanumeric fields work to me correctly.


That is the .mas
FILENAME=COMIMPM, SUFFIX=SQLORA , $
SEGMENT=COMIMPM, SEGTYPE=S0, $
FIELDNAME=NUMCOMERC, ALIAS=NUMCOMERC, USAGE=A10, ACTUAL=A10, $
FIELDNAME=NOMCOMERC, ALIAS=NOMCOMERC, USAGE=A30, ACTUAL=A30, MISSING=ON, $
FIELDNAME=MAXOPER, ALIAS=MAXOPER, USAGE=P8, ACTUAL=P8, MISSING=ON, $
FIELDNAME=MAXDIA, ALIAS=MAXDIA, USAGE=P8, ACTUAL=P8, MISSING=ON, $
FIELDNAME=MAXSET, ALIAS=MAXSET, USAGE=P8, ACTUAL=P8, MISSING=ON, $
FIELDNAME=MAXMES, ALIAS=MAXMES, USAGE=P8, ACTUAL=P8, MISSING=ON, $


________________________________________________

That is de .fex

MAINTAIN FILE COMIMPM

INFER COMIMPM.NUMCOMERC INTO PILA
STACK CLEAR PILA
REPOSITION COMIMPM


COMPUTE PILA.NUMCOMERC ='&NCOMERC';
PILA.NOMCOMERC ='&NOMCOMERC';
PILA.MAXOPER= &MAXOPER;

UPDATE NOMCOMERC MAXOPER FROM PILA
END


_______________________________________________

Thanks
October 17, 2005, 01:31 PM
Maintain Wizard
I assume that this TABLE has one key, NUMCOMERC and the access file has WRITE=YES. When using a REPOSITION statement, you should use the name of the KEY field, not the segment name. Also, depending on your enviornment, Maintain doesn't always recognize Amper Variables.

A good simple test would be just to update the MAXOPER for the first record with a hardcoded value, like this:

MAINTAIN FILE COMIMPM

INFER COMIMPM.NUMCOMERC INTO PILA
STACK CLEAR PILA
REPOSITION COMIMPM.NUMCOMERC
NEXT COMIMPM.NUMCOMERC INTO PILA

PILA.NOMCOMERC ='ABC';
PILA.MAXOPER= 123;

UPDATE NOMCOMERC MAXOPER FROM PILA
END

And see if the first record updates. If it does, then you will have to make sure that the incoming amper variables have the values you are expecting (You can TYPE them out). If not, let me know and we can try something else.

Mark
October 18, 2005, 06:22 AM
joan_c
Hi Mark

Thanks for your answer

The test continues updating single field NOMCOMERC, and leaving MAXOPER to zero


what follows is the view source off the original process

SET MSG=ON
-SET &ECHO=ALL;
SET TRACEOFF = ALL
SET TRACEON = STMTRACE//CLIENT
SET TRACEON = STMTRACE/2/CLIENT
SET TRACEUSER = ON
SET XRETRIEVAL = ON
SET PAGE-NUM = OFF
MAINTAIN FILE COMIMPM

INFER COMIMPM INTO PILA
STACK CLEAR PILA
REPOSITION COMIMPM

COMPUTE PILA.NUMCOMERC ='5252525252';
PILA.NOMCOMERC ='ALMACENES JULEON SANXESS ';
PILA.MAXOPER= 12150;
UPDATE NOMCOMERC MAXOPER FROM PILA
END
-GOTO SALTA
-SALTA
-SET &NUM_MOD= 0;
14.01.29 AE SELECT T1."NUMCOMERC",T1."NOMCOMERC",T1."MAXOPER",T1."MAXDIA",
14.01.29 AE T1."MAXSET",T1."MAXMES" FROM WEBFOCUS.COMIMPM T1 WHERE
14.01.29 AE (T1."NUMCOMERC" = :0001);
14.01.29 AE UPDATE WEBFOCUS.COMIMPM SET "NOMCOMERC" = :0001,"MAXOPER" =
14.01.29 AE :0002 WHERE ("NUMCOMERC" = :0003);
TRANSACTIONS: COMMITS = 1 ROLLBACKS = 0
SEGMENTS : INCLUDED = 0 UPDATED = 1 DELETED = 0
-SET &NUM_MOD= 1;


Thanks again
October 18, 2005, 12:41 PM
Maintain Wizard
You are sure that PILA.NOMCOMERC is updating? If you table the file, you see the new NOMCOMERC, and MAXOPER is 0? Please make sure that the data in that field IS changing. I would say put in a COMMIT after the UPDATE statement, but that would make sense if none of the fields were updating.

Please open a case with Support. Maybe we can dial in and see the problem.

Thanks
Mark
October 19, 2005, 06:24 AM
joan_c
Hi Mark

Indeed, NOMCOMERC updates and MAXOPER is to zero.

It must be a problem of the Oracle connection, since if I create same the table one in webfocus the process works correctly

I have opened a case, I will communicate the solution.

Thanks for everything.