What is wrong with my code? I'm trying to query information from a comma delimited file on a shared folder:
SET PCOMMA=ON FILEDEF MYFILE DISK //HORSEISLAND/NETSHARE/MEDICAL/OOQ/SOLUTIONSWORLD/TEST/MYFILE.TXT TABLE FILE MYFILE PRINT * ENDThis message has been edited. Last edited by: Mark1,
Windows version 768
November 09, 2009, 04:47 PM
Waz
Shouldn't your slashes be \ instead of /.
What happens, what error message or results ?
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
November 09, 2009, 04:53 PM
Mark1
I get the FILE MYFILE CANNOT BE FOUND. But I can see it there with windows explorer.
Windows version 768
November 09, 2009, 04:54 PM
Doug
Do you have a Master set up to read "MYFILE"?
Is this a file allocation error or a filre read error? What's your &FOCERRNUM?
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
November 09, 2009, 04:56 PM
Mark1
I get this error:
0(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: No data description can be found for the file requested. Check the Master File Descriptions allocated or available, or the spelling of the file name. If you are in Screen Painter, type IGNore to continue, or any other input to return to TED.
I thought you could read in a text file and query from it without creating a master file.
Windows version 768
November 09, 2009, 05:05 PM
Waz
WebFOCUS requires a master for any file.
It is needed so WF knows what format the file is and therefore what module to call to read it.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
November 09, 2009, 05:07 PM
Darin Lee
Nope. Part of the "magic" of WebFOCUS is in the Master File Description. Any data read done through WebFOCUS will require a Master file description. You can create one "on the fly" in your fex (which there are many examples of in the forum) but it's recommended to create an MFD which can be re-used and you'll also need a FILEDEF in your code or a DATASET declaration in the MFD that points to the actual data file.
(No, SQL passthru doesn't require an MFD, but there is not SQL passthru for COM files.)
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
November 09, 2009, 05:14 PM
Waz
The interesting thing about SQL passthrough is that it uses the structure of the returning data to build a master (SQLOUT), which TABLE FILE needs.