Focal Point
[SOLVED] combining focus tables

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

August 10, 2018, 12:26 PM
folkie
[SOLVED] combining focus tables
Here's some sample code of a report (encumbrances6320.fex) I'm trying to run:

USE
Encumbrances2017 AS EncumbrancesAll
Encumbrances2018 AS EncumbrancesAll
END

TABLE FILE EncumbrancesAll
IF RECORDLIMIT EQ 10
PRINT *
ON TABLE HOLD AS Encumbrances_82 FORMAT FOCUS
END

But I get the following with SET ECHO:

USE
Encumbrances2017 AS EncumbrancesAll
Encumbrances2018 AS EncumbrancesAll
END
TABLE FILE EncumbrancesAll
IF RECORDLIMIT EQ 10
PRINT *
ON TABLE HOLD AS Encumbrances_82 FORMAT FOCUS
END
-EXIT
ERROR AT OR NEAR LINE 56 IN PROCEDURE encumbrances6320
(FOC036) NO DATA FOUND FOR THE FOCUS FILE NAMED: encumbrances2017.foc

ERROR AT OR NEAR LINE 57 IN PROCEDURE encumbrances6320
(FOC036) NO DATA FOUND FOR THE FOCUS FILE NAMED: encumbrances2018.foc

ERROR AT OR NEAR LINE 68 IN PROCEDURE encumbrances6320
(FOC036) NO DATA FOUND FOR THE FOCUS FILE NAMED: ENCUMBRANCESALL

This is what FOC036 is:

(FOC036) NO DATA FOUND FOR THE FOCUS FILE NAMED: %1
Either data cannot be located for the FOCUS file, or access is not
allowed. If data cannot be located, a USE command may be needed.

The above code works with WebFocus version 77. However, we're migrating to version 82 and that's where I'm getting the FOC036 error. But if I do a TABLE FILE against one of those 2 focus tables in version 82, I get data.

I don't understand why the USE statement can't get to the data in those 2 focus tables.

Thanks,
Mark

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


WF 8.2.02
App Studio
DataMigrator
ReportCaster
Windows Server 2016
August 10, 2018, 12:30 PM
FP Mod Chuck
Mark

Make sure the .foc files are in a app folder in the APP PATH or add an APP PATH command to the app folder at the beginning of the fex.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
August 10, 2018, 01:21 PM
MartinY
quote:

Encumbrances2017
Encumbrances2018

What file type are they ?
Do you have a MFD (.mas) defined for them ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
August 10, 2018, 01:24 PM
BabakNYC
USE only works with .FOC files.

https://webfocusinfocenter.inf...ng/source/use108.htm


WebFOCUS 8206, Unix, Windows
August 10, 2018, 01:36 PM
folkie
The 2 tables in the USE are focus tables. In the real code I use APP PATH. Like I say, the same code works in version 77.

But minutes ago, I looked at a focexec my co-worker has with a USE and it works fine. She's using different focus tables. I'm trying to figure out what other differences there are between hers and mine.

Thanks,
Mark


WF 8.2.02
App Studio
DataMigrator
ReportCaster
Windows Server 2016
August 10, 2018, 04:49 PM
Hallway
There is A LOT of code tightening between v77 and v82. You might need a fully qualified path to the hold file.

Try the following and see if WF can give you the full path to the hold files
  
WHENCE Encumbrances2017 MASTER
WHENCE Encumbrances2018 MASTER



Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
August 13, 2018, 02:48 PM
folkie
Hallway,

I thought your suggestion was one of the many things I tried. However, when I just tried it, it worked!

Apparently, I used the path for the focus tables, but I left off the ".foc" filename extension. Using .foc along with the path is what did the trick.

Thanks,
Mark


WF 8.2.02
App Studio
DataMigrator
ReportCaster
Windows Server 2016