Focal Point
FILEDEF NAMING IN DESKTOP FOCUS

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

April 08, 2004, 09:45 PM
<Robert>
FILEDEF NAMING IN DESKTOP FOCUS
In mainframe FOCUS, I am able to use:
-SET &REPORT = "MyFile"

I can then later use that to:

ON TABLE HOLD AS &REPORT FORMAT LOTUS

The dataset is then called "MyFile"

However, this process does not work in Desktop/WebFocus when I set my &REPORT and then
try to ON TABLE PCHOLD &REPORT FORMAT PDF

Is there a way around this?

Thank you.
April 09, 2004, 12:02 PM
Tom Fasso
Robert,
Which release of dev studio are you using? The following runs in release 5.2.1:
-SET &REPORT = 'ABCRPT';
TABLE FILE CAR
PRINT CAR
BY COUNTRY
ON TABLE PCHOLD AS &REPORT FORMAT PDF
END

When you say "doesn't work", what messages are being displayed?

Tom
April 09, 2004, 01:27 PM
<WFUser>
Robert,

First of all a HOLD file goes to temporary space and gets deleted. To get a round this you need to FILEDEF name DISK path\filename to get around that. Assuming you're doing that, the second problem is the PCHOLD. PCHOLD sends the answer set down to your browser. Since the WebFOCUS server knows nothing about your PC, you can't FILEDEF to your local machine. This leaves you with 2 choices. Either do a PCHOLD to your screen and then save the PDF doc locally, or FILEDEF and HOLD on the server. You can always ftp from there. A third option would be to use Report Caster to email to you if you have Report Caster.
April 09, 2004, 03:16 PM
<Robert>
Thank you for the quick response(s).

I am still using Desktop 4.3.6 and I do not yet have Dev Studio (although I should be getting that soon).
I am not getting an error when running my procedure, rather my PCHOLD file does not get named according to my Set &REPORT line of code. The report is held on my PC as "@0000001.pdf".

Thanks again.
April 13, 2004, 07:03 AM
Tony A
Robert,

Are you using APP PATH?

If so you can also direct your output by using -

APP HOLDMETA app
APP HOLDDATA app

where app is a valid application contained within the path.

The first one redirects any master and access files created with the hold command whereas the second one redirects data files.

This should be valid for 4.3.6 (512) but will only redirect the files relative to the server. As WFUSER has intimated your perceived problem is with the use of PCHOLD.

PCHOLD does not do what you might think and only returns the output to your browser as your machine is "an unknown" to the server. If you have a share on your machine then you could filedef to that (e.g. FILEDEF &MYREPORT DISK //192.168.12.10/myshare/&MYREPORT...pdf) but you should then use HOLD and not PCHOLD.

Hope this helps.