Focal Point
[CLOSED] Not updating the BASE

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

January 13, 2020, 07:12 AM
Poryes
[CLOSED] Not updating the BASE
Hi -

I have a focexec where it updates a particular field to zero.
I ran the focexec using JCL and it completed good.

0 TRANSACTIONS: TOTAL = 15 ACCEPTED= 15 REJECTED= 0
SEGMENTS: INPUT = 0 UPDATED = 15 DELETED = 0

It has to update the 15 Records where I am updating a particular field to ZERO.

But When I looked into the BASE, It deleted all the matching 15 records rather than updating.

Can someone help me on this?

Here is my Focexec.

TABLE FILE ALPABASE
PRINT DTE1
BY DTE2
BY TERM
BY ST
BY BILLNO
IF DTE1 EQ '200107'
IF TERM EQ '0010'
IF BILLNO EQ '20101410'
ON TABLE HOLD AS ALPTRAN
END

MODIFY FILE ALPABASE
FIXFORM FROM ALPTRAN
MATCH DTE2
ON MATCH CONTINUE
ON NOMATCH REJECT
MATCH TERM
ON MATCH CONTINUE
ON NOMATCH REJECT
MATCH ST
ON MATCH CONTINUE
ON NOMATCH REJECT
MATCH BILLNO
ON NOMATCH REJECT
ON MATCH COMPUTE
DTE1=0;
ON MATCH UPDATE DTE1
DATA ON ALPTRAN
END

PS: Using FOCUS 7.6.13

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
January 13, 2020, 07:18 AM
Tony A
It appears as though you are trying to update the key field that you initially MATCH upon. This is not permitted in MODIFY.


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 13, 2020, 07:27 AM
Poryes
quote:
It appears as though you are trying to update the key field that you initially MATCH upon. This is not permitted in MODIFY.


Thanks for your quick reply Tony.
DTE1 is not a key field in the master file.


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
January 13, 2020, 07:43 AM
Tony A
quote:
DTE1 is not a key field in the master file.

Then why is it your first MATCH?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 13, 2020, 07:45 AM
Poryes
quote:
DTE

Sorry, That should be DTE2 in the first match.


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
January 13, 2020, 07:46 AM
BabakNYC
DTE1 seems to be an alpha field according to your TABLE request but you’re setting it to a number 0. Could that be the problem?


WebFOCUS 8206, Unix, Windows
January 13, 2020, 08:29 AM
Poryes
Yes, I am updating DTE1 to Zero and I don't thing that should be a problem.

The base is updated correctly. I think I have queried the base incorrectly after the update. My bad.

Thanks all for your help.

This message has been edited. Last edited by: Poryes,


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
January 13, 2020, 01:37 PM
Waz
Can you post the ALPABASE master ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!