Focal Point
[SOLVED] how to report on only new records added?

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

August 21, 2009, 09:49 AM
webmeister
[SOLVED] how to report on only new records added?
I've got a project that creates a FOCUS file each day; what I am interested in is how would I modifiy my program so that it only adds new records generated for the subsequent day, so that when I go to report information, my report only shows the records added for that day? In other words, I don't want my report to have the previous day's information, only the follow-on day's information.

If anyone has an example or can refer me to a link or other area for this sort of thing, I would appreciate it.

Thank you in advance!

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


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
August 21, 2009, 10:08 AM
GamP
Do you have one focus file that holds all information for all days?
Or do you have one focus file for each day?
The first option would require you to include a date field in the file on which you can do your select.
The second option would result in a number of focus file each with probably the same record layout but each with a different name that reflects the date in some manner.
In your program you would have to have a means of identifying what date or date range you want to report on. For the first option this would result in a variable 'IF/WHERE DATE EQ &SELDATE', for the second it would be a variable 'USE FOCUS&SELDATE...FOC AS FOCUSFILE' command, followed by TABLE FILE FOCUSFILE.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
August 21, 2009, 10:30 AM
webmeister
GamP,

Thank you for repying. I am thinkiong of having one file for all days, so I do believe I would need a date field, as you suggested. Not having done this sort of thing before, I'm a little shaky. I think I would like to add the system date to my file and then check that date on the next day against that day's system date. Is that possible? What is the FOCUS name of the system date?

Thanks again for replying.


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
August 21, 2009, 11:32 AM
GinnyJakes
&YYMD is one of them.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
August 21, 2009, 02:15 PM
GamP
You'd first have to rebuild your database. You could do this by issueing the rebuild dump command, change the master file (add the date field), recreate the file and do a rebuild load. Be sure to have a backup made, for just in case.....
Then you can modify your program that loads the database to include the date field. As Ginny said, you can use the &YYMD variable to populate the field.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
August 24, 2009, 10:01 AM
webmeister
Thank you all for replying. I'll apply your suggestions - it should be relatively easy to do.


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
August 25, 2009, 09:42 AM
KenFR
I did something similiar to this a few months ago. A job made a table of unique keys for all records and stored it; then each day it would run and compare the previous days keys to the current database so the delta was what was added since the last run. This was used to update a separate data warehouse so it did not matter if it ran once a day or 10 times per day because a new base file was created each time it ran. I used MATCH FILE to get the delta


8105 Tomcat and AIX reporting server
input: Teradata, SQL, DB2, Essbase, Oracle, text
output:html, excel, PDF,
August 26, 2009, 04:32 AM
Gobinath Velusamy
Hi

Instead of using Date Files . In your database you can use some indicator column to represent the Today's chage data .Then create the Bitmap index on that column. The performance of the report will be improved a lot


WebFOCUS 7610
Windows
August 26, 2009, 03:21 PM
webmeister
Ummmm, I don't think Mainframe FOCUS, Release 7.1 can deal with bitmaps and respective indexes. Please note that my signature indicates I am running mainframe FOCUS. If I am wrong, please let me know.

Thank you for replying.


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO