Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [solved] MODIFY command log shows records updated but in fact they are NOT

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[solved] MODIFY command log shows records updated but in fact they are NOT
 Login/Join
 
Platinum Member
posted
I had a MODIFY request that does INSERT and UPDATE against a MSSQL table by the MATCH command:

MODIFY FILE MS_AUM_FACT_SEC
FIXFORM FROM TEMP_SCD_NNA_FLAT
MATCH ACCT_CODE MONTH_END SEC_ID
ON MATCH UPDATE NNA LAST_UPDATED
ON NOMATCH INCLUDE
DATA ON TEMP_SCD_NNA_FLAT
END



The log result is

0 TRANSACTIONS: TOTAL = 671 ACCEPTED= 671 REJECTED= 0
SEGMENTS: INPUT = 189 UPDATED = 482 DELETED = 0


But in fact only 189 rows are inserted. Those rows that are supposed to be updated still have the old values.

How can I fugure out what goes wrong? Thanks,

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


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
Expert
posted Hide Post
I'd verify the synonym to ensure that the fieldnames and formats are as expected... And go from there...

And then do a TABLE FILE MS_AUM_FACT_SEC and TEMP_SCD_NNA_FLAT to hold files, with different names, before and after the MODIFY with each block ended with a -RUN and compare those for verification.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Master
posted Hide Post
The first thing I noticed is that you don't have the following:
ON NOMATCH SQL COMMIT WORK
ON MATCH SQL COMMIT WORK


Maybe they aren't required anymore but 20 years ago they were, so I always include them.

Also, the master for your FIXFORM file does contain the fields NNA and LAST_UPDATED, right? And those fields have values? Also, where does that file come from? If it is output from a TABLE command, then make sure you have a ON TABLE SET HOLDLIST PRINTONLY command. TABLE can put a field in the file multiple if it is used in COMPUTES or in multi-level TABLE commands like this in which you would need to use NOPRINT or AS phrase to get unique field names:
TABLE FILE XXX
  SUM AAA
   BY CCC
  SUM BBB
   BY CCC
   BY AAA
PRINT DDD EEE FFF
   BY CCC
   BY AAA
   BY BBB
END

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


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by Doug:
I'd verify the synonym to ensure that the fieldnames and formats are as expected... And go from there...

And then do a TABLE FILE MS_AUM_FACT_SEC and TEMP_SCD_NNA_FLAT to hold files, with different names, before and after the MODIFY with each block ended with a -RUN and compare those for verification.


I saved only one record in the source file, copy the data to SQL and run an UPDATE command, and it works. But when I run the MODIFY, the log message still showed 1 UPDATED, while nothing actually changed.

Is there a way to log the SQL statement MODIFY passed to the database like TRACE?


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
Platinum Member
posted Hide Post
Finally got it fixed after I plugged this in to the DataMigrator.

In DataMigrator the interface shows the table key fields are different than the real key fields in the SQL table. The cause is probably the order of fields in the table had been changed, but in the master file the order did not change after "synonym refresh". webfocus/datamigrator blindly picks the first 3 fields as table key. After I change the field order in the master file, everything goes normal.

However, it still bothers me that webfocus matched the wrong key fields in the synonym, rather than the matching key fields I specified in the program:

MATCH ACCT_CODE MONTH_END SEC_ID


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [solved] MODIFY command log shows records updated but in fact they are NOT

Copyright © 1996-2020 Information Builders