x
Syntax: How to Create a Visual Discovery Output File Using WebFOCUS Language
[ON TABLE] HOLD [AS filename] FORMAT VISDIS
[ON TABLE] PCHOLD [AS filename] FORMAT VISDIS
[ON TABLE] SAVE FILENAME 'application_name/filename.txt' FORMAT VISDIS
where:
- HOLD
Creates the results in memory but does not save them to a
text file unless you specify the Dialogue Manager command APP HOLD application_name in
the report request.
For details on HOLD, see the topics on
saving and reusing report output in the Creating Reporting Applications With Developer Studio manual.
- PCHOLD
Presents the results as output to a browser. When accessed
by Visual Discovery, the procedure is initialized by the ActiveX
control using the URL of the procedure. The ActiveX control then
interprets the output. Visual Discovery uses a live data pool and
does not require a physical output file.
- SAVE
Creates a physical output file for use when the Visual Discovery
page points to a static data pool.
- filename
Is the name of the output file. The file is created with
the extension .txt on UNIX and Windows platforms. On VM, the file
is created with file type TXT.
Note: A
Master File is not created for format VISDIS.
Example: Creating a Visual Discovery Output File Using WebFOCUS Language
Using
the CENTURYSALES data source, the following request creates a Visual Discovery
output file named AUDIOSYSTEMSSALES.TXT, which is stored in the Visual_Discovery
application folder in Developer Studio.
TABLE FILE CENTURYSALES
SUM
QUANTITY
LINEPRICE AS 'Revenue'
BY PRODUCTCATEGORY
BY PRODUCTNAME
WHERE SALESREP EQ 'Web';
WHERE PRODUCTCATEGORY EQ 'Audio Systems';
ON TABLE SAVE FILENAME
'VISUAL_DISCOVERY/AUDIOSYSTEMSSALES.TXT'
FORMAT VISDIS
END
The following file is created. For clarity, the
tab characters in the file are displayed as a caret (>) surrounded
by blanks. Note that the first record has the column titles and
the second has the Visual Discovery formats.
Product Category > Product Name > Quantity > Revenue
S > S > I > R
Audio Systems > Home Theater 5.1 System > 2087 > 4171913.00
Audio Systems > Home Theater 7.1 THX System > 243 > 728757.00
Audio Systems > Home Theater Surround System > 703 > 702297.00
Audio Systems > Micro 5.1 System > 857 > 427643.00
Audio Systems > Micro HiFi Stereo System > 2096 > 836304.00