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] ? FILE - when does this return a value?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] ? FILE - when does this return a value?
 Login/Join
 
Member
posted
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, 2006Report This Post
Expert
posted Hide Post
Dave, Are you loading through SU, or directly ?

It may be an idea to set a flag somewhere by the loading program instead, then check the flag.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
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, 2006Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
Member
posted Hide Post
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, 2006Report This Post
Expert
posted Hide Post
Dave,

Do you know how the other group (herein called the "untouchables" Wink) 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, 2004Report This Post
<JG>
posted
Dave I agree with Tony,

If they are running the process that creates the Focus DB under Report Caster
all you need to do is check the log.

Check if it has an END_STAMP for the date you are running and also check
the ERROR column to make sure it completed correctly.

There are plenty of posts regarding re-submitting a caster job if it's
dependencies are not ready.
 
Report This Post
Master
posted Hide Post
Can you have their job submit your job via DSTRUN?


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
Master
posted Hide Post
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.




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
? FDT
will also display the 'latest update' timestamp, and (for a large Focus or Xfocus file) is considerably faster than
? FILE


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
Have you thought about using the last modified date of the FOC file its self.

You could use APP QUERY and check the DATE and TIME columns


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
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, 2006Report This Post
Expert
posted Hide Post
I gave it a quick test (In windows WF 766).

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...

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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
Expert
posted Hide Post
I would have thought that it doesn't matter if the Date Modified is updated during or after the process finishes.

A simple test if the date to see if it hasn't changed in a while would suffice.

You could use HDIFF to determine the number of seconds/minutes after the last update, then trigger the next event.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
I just did a test loading a Foc file with a couple of million records.

Windows doesn't seem to record the updates against the file (Date Modified).

But Unix (Solaris) updates cosntantly, I assume with every check point.

Looks like it is OS specific.

I still believe my previous post is a good way to go.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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] ? FILE - when does this return a value?

Copyright © 1996-2020 Information Builders