Focal Point
FOC205 The description cannot be found for file

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

July 31, 2008, 03:32 PM
lmorgan
FOC205 The description cannot be found for file
I am new to Webfocus and Dev Studio. I have created a procedure that uses SQL to query and union 3 like file together. Then I create a report with the fields I need and output that report to a Focus Database. Then the next report I want to use that Focus file as a dynamic list drop down for my parameter Part#. When the report runs I get the FOC205 error. I am trying to use a temp file for a drop down selection box for my final report.


WF 764 on AS400
July 31, 2008, 04:54 PM
Tom Flynn
lmorgan,

Welcome to the WebFOCUS Training Center! Big Grin

When you output your data to a FOCUS DB, you need to HOLD it in an application folder.
Create a folder under Data Servers, EDASERVE, Applications called TEMP

Place

APP HOLD TEMP

at the top of the program that creates the FOCUSDB

? PATH - tells you all the folders in the path

After you created a TEMP folder, and, since it is NOT on the path, then:

APP PREPENDPATH TEMP

this adds the TEMP folder to the other folders.

Then

USE
FOCUSDB.foc
END

or

APP FI FOCUSDB DISK TEMP\FOCUSDB.FOC

Hope this helps...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
August 01, 2008, 08:46 AM
lmorgan
Still no success. Here is what my code looks like:
APP HOLD LMM
APP PREPENDPATH LMM
APP FI PARTFILE DISK LMM\PARTFILE.FOC
-*APP SHOWPATH
SQL DB2 PREPARE SQLOUT FOR
select
prod#, pdesc, pcust#, 'SAP' AS LOC
from sapdata/bllpart1 where PACTIV = 'Y'
union
select
prod#, pdesc, pcust#, 'MEX' AS LOC
from mexdata/bllpart1 where PACTIV = 'Y'
union
select
prod#, pdesc, pcust#, 'HAN' AS LOC
from handata/bllpart1 where PACTIV = 'Y'
order by prod# ;
END
TABLE FILE SQLOUT
PRINT
PROD#
PDESC
PCUST#
COMPUTE PLANT/A20 = IF LOC EQ 'SAP' THEN 'SPARTA' ELSE IF LOC EQ 'MEX' THEN 'MEXICO' ELSE IF LOC EQ 'HAN' THEN 'HANNIBAL' ELSE ' NOTHING';
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS PARTFILE.FOC FORMAT FOCUS


WF 764 on AS400
August 01, 2008, 08:55 AM
Tom Flynn
lmorgan,

Since LMM is a already in the Application folder, APP PREPENDPATH is not necessary:

  
APP HOLD LMM
-* APP PREPENDPATH LMM
-* APP FI PARTFILE DISK LMM\PARTFILE.FOC
-* APP SHOWPATH
SQL DB2 PREPARE SQLOUT FOR
select
prod#, pdesc, pcust#, 'SAP' AS LOC
from sapdata/bllpart1 where PACTIV = 'Y'
union
select
prod#, pdesc, pcust#, 'MEX' AS LOC
from mexdata/bllpart1 where PACTIV = 'Y'
union
select
prod#, pdesc, pcust#, 'HAN' AS LOC
from handata/bllpart1 where PACTIV = 'Y'
order by prod# ;
END
TABLE FILE SQLOUT
SUM 
  COMPUTE PLANT/A20 = IF LOC EQ 'SAP' THEN 'SPARTA' ELSE IF LOC EQ 'MEX' THEN 'MEXICO' ELSE IF LOC EQ 'HAN' THEN 'HANNIBAL' ELSE ' NOTHING';
  BY PROD# 
  BY PDESC
  BY PCUST#
ON TABLE HOLD AS PARTFILE FORMAT FOCUS INDEX PROD#  
END
-RUN


Now, to access PARTFILE.foc, now add the APP PREPENDPATH, you may or may not need the APP FI:

  
APP PREPENDPATH LMM
-* APP FI PARTFILE DISK LMM\PARTFILE.FOC
-* APP SHOWPATH
TABLE FILE PARTFILE
PRINT *
IF RECORDLIMIT EQ 10
END
-EXIT


See if you get the 10 records...

If you get 0 records, or PARTFILE not found, uncomment the APP FI and try again...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
August 02, 2008, 11:27 AM
Jim Morrow
quote:
lmorgan



You do not give a WebFocus Version or platform. It should be part of your signature.

Is the message coming from the “TABLE FILE SQLOUT”?

When we upgraded to 7.6.4 from 5.3.3. we was discovered some :code tightening” One of these was when doing a SQL pass thought there could be absolutely nothing between the semi-colon ( ; ) and the “TABLE FILE SQLOUT”, otherwise you get an error description can not be found. Try removing the “END” after the semi-colon ( ; )


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



August 04, 2008, 01:27 AM
Danny-SRL
Imorgan,

A couple of points.

1. One doesn't FILEDEF Focus files. Either they are in the path or not. If they are WF will find them; if not then the command is USE. In your case, with the APP HOLD and APP PREPENDPATH, you should be ok.

2. When you want to hold a FOCUS file the command is:
ON TABLE HOLD AS filename FORMAT FOCUS [INDEX fieldname]
The INDEX option is used if you want to have an index field in the file.

If you are creating large files with indexes (the rule of thumb is records*number of indexes greater than 20,000), there are techniques which include alternate masters, blocked fields and REBUILD/INDEX.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF