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.
What happens if a ? FILE command is issue while a FOCUS database is in the process of being loaded? Will it return a value, or will it abend?
We want to use ? FILE as an alert trigger to see if a FOCUS database is ready to be read, but I don't want to get a false-positive if we get statistics back on a partially loaded table.This message has been edited. Last edited by: Kerry,
WebFOCUS 7.6.1 AIX / Windows 2003
Posts: 17 | Location: Milwaukee | Registered: February 16, 2006
We are reading a FOCUS file that someone else is creating and loading. We pull an extract from the FOCUS file to use on a different server. Since we want the file as soon as it is loaded, we were going to use a RC alert... so we have no ability to set a flag. ? FILE was a way we hoped would get us there quicker, but I don't want to kick off our extract process if the file is in the process of being loaded. Unfortunately, we'll just have to schedule the job well outside of the load window if this doesn't work.
WebFOCUS 7.6.1 AIX / Windows 2003
Posts: 17 | Location: Milwaukee | Registered: February 16, 2006
Could you have whoever is loading the focus file copy an empty trigger file like loaded.txt when their process has completed? Then you can just check for the existence of that file since it won't exist until the load has completed. You would have to be sure and delete ithe trigger file after you have done your processing.
I pretty sure that you'll get a false positive to ? FILE. The file exists so you may get statistics, even though it may still be loading
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Thanks Waz and Darin - unfortunately we have no control over the group creating the file and that process won't change. I had considered the trigger file technique, but with no ability for us to change the current process, that's out.
I think I got the answer I need - barring the changes suggested, we will probably get false positives if we run a ? FILE on the database any time prior to it being completely loaded.
Thanks!
WebFOCUS 7.6.1 AIX / Windows 2003
Posts: 17 | Location: Milwaukee | Registered: February 16, 2006
Do you know how the other group (herein called the "untouchables" ) run the load job? If it is via RC and you have access to their RC, then looking at the RC tables might give you a possible method.
AS for ? FILE, this will update with stats as the file is loaded so you are correct not to use that method.
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
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Another option is that generaly during a file update process the date/time is changing on the file. you could look at the maybe every 3 minutes or so and see if it has changed sence that last time you look and if it is the same you might be able to assume the update job is complete.
Waz - that's another angle I hadn't thought of. What gets returned if we hit the file while its in the process of loading? If its the prior date, that would work. If it updates during loading, we could potentially be lead to believe the file is done.
Does the last modified date only update when the load is complete?
WebFOCUS 7.6.1 AIX / Windows 2003
Posts: 17 | Location: Milwaukee | Registered: February 16, 2006
Seems the last changed does not change until the MODIFY finishes, then it gets updated.
The code below shows the process.
-* Uncomment me the first run.
-*TABLE FILE CAR
-*SUM COMPUTE
-* CDATE/YYMD = &YYMD ;
-*BY COUNTRY
-*ON TABLE HOLD AS TESTMOD FORMAT FOCUS
-*END
-*-RUN
! dir testmod.foc
-RUN
MODIFY FILE TESTMOD
FIXFORM COUNTRY
COMPUTE CNTR/I9 = 1 ;
GOTO LOOPER
CASE LOOPER
COMPUTE CNTR = CNTR + 1 ;
IF CNTR EQ 100000000 THEN GOTO ENDCASE ;
MATCH COUNTRY
ON MATCH COMPUTE CDATE=&YYMD;
ON MATCH UPDATE CDATE
ON MATCH GOTO LOOPER
ON NOMATCH REJECT
ENDCASE
DATA
ENGLAND
END
-RUN
! dir testmod.foc
-RUN
Here is the output
Directory of C:\ibi\DEVSTU~1\srv76\wfs\tst
18/09/2008 01:46 PM 4,096 testmod.foc
1 File(s) 4,096 bytes
0 Dir(s) 15,618,281,472 bytes free
C:\ibi\DEVSTU~1\srv76\wfs\tst\testmod.foc ON 09/18/2008 AT 13.47.19
TRANSACTIONS: TOTAL = 1 ACCEPTED= 1 REJECTED= 0
SEGMENTS: INPUT = 0 UPDATED =99999998 DELETED = 0
Volume in drive C is OS
Volume Serial Number is 7C4E-0897
Directory of C:\ibi\DEVSTU~1\srv76\wfs\tst
18/09/2008 01:51 PM 4,096 testmod.foc
1 File(s) 4,096 bytes
0 Dir(s) 15,618,215,936 bytes free
The Date Modified in Explorer stayed at 18/09/2008 01:46 until the program ended.
Waz, In your test case indeed the file gets updated only after the program closes. This is because you update only the one record, not causing any buffer to flush, so not needing to write to the file. If the buffer does need flushing (by either a lot of different records to update or insert), the file will get written to during the modify. I also think that doing explicit commits will write to the file, because it is actually the same as flushing the buffers.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007