ON TABLE HOLD and ON TABLE SAVE will save the results back to the machine where the reporting server is installed. ON TABLE PCHOLD will attempt to save to your local machine. No FILEDEF required.
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 03, 2019, 04:23 PM
AMC2
None of this is generating the file on my local machine:
-SET &ECHO = ALL;
APP MAP holdapp /C:/ibi
APP HOLDDATA holdapp
APP HOLDMETA holdapp
-*FILEDEF ACSGROUP DISK "C:\ibi\ACSGROUP.ALPHA"
FILEDEF ACSGROUP DIR \C:\ibi\ACSGROUP.ALPHA
-*FILEDEF ACSGROUP DISK \\C:\ibi\ACSGROUP.ALPHA
DEFINE FILE SV_SHIPMENTS
SHIPDATE_YR/YY = SHIPDATE;
DELIVERY_DATE_YR/YY = DELIVERY_DATE;
BILL_DATE_YR/YY = BILL_DATE;
SELECT_YR/A3 = IF (SHIPDATE_YR EQ '2019' OR DELIVERY_DATE_YR EQ '2019' OR BILL_DATE_YR EQ '2019')
THEN 'YES' ELSE 'NOP';
CURR_USER/A100V=UPPER(REPLACE('jsutton', 'hills\', ''));
END
TABLE FILE SV_SHIPMENTS
PRINT *
-* SHIPDATE
-* SHIPDATE_YR
-* DELIVERY_DATE_YR
-* BILL_DATE_YR
BY MASTER_CLIENT_NAME NOPRINT
WHERE MASTER_CLIENT_NAME EQ 'ACS GROUP';
WHERE SELECT_YR EQ 'YES';
WHERE SV_SHIPMENTS.SV_SHIPMENTS.LOGIN_ID EQ CURR_USER
-*WHERE RECORDLIMIT EQ 10
-*ON TABLE PCHOLD FILENAME 'C:\ibi\ACSGROUP' FORMAT ALPHA
-*ON TABLE SAVE AS 'C:\ibi\ACSGROUP' FORMAT ALPHA
ON TABLE HOLD AS ACSGROUP FORMAT ALPHA
END
-RUN
-EXIT
WebFOCUS 8.2.06 SQL Server HTML, PDF, Excel, etc
October 03, 2019, 04:35 PM
FP Mod Chuck
AMC2
I tried this on my machine and even though I tried to name the file it downloads a file wfservlet.ibfs. The first time I associated the ibfs file type with textpad so it would open it the next time. By default it stores it in the download folder on my machine. It's not perfect but it will get you the file on your machine.
I just have ON TABLE PCHOLD FORMAT ALPHA
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 03, 2019, 05:35 PM
AMC2
Chuck - Ok this works on my machine as you say too. Right, not perfect but it gets the file on my machine in alpha format. Thanks.
WebFOCUS 8.2.06 SQL Server HTML, PDF, Excel, etc
October 03, 2019, 07:13 PM
FP Mod Chuck
AMC2
One other option is to use ON TABLE PCHOLD FORMAT WP The output will come up in a browser where you can copy and paste into textpad and save the file.
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 04, 2019, 10:50 AM
AMC2
Chuck - Thanks for this format as well. The data generates wrapped using both ways...the column headings and the field values are wrapped at a certain point.
WebFOCUS 8.2.06 SQL Server HTML, PDF, Excel, etc
October 04, 2019, 11:34 AM
FP Mod Chuck
Hmmmmmm, I do not experience any data wrapping with either method and each line is over 500 characters.
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 04, 2019, 12:02 PM
AMC2
Here's how the column headings are coming out for me below. The field values are coming out the same way.
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 04, 2019, 12:30 PM
AMC2
-*FILEDEF ACSGROUP DISK "C:\ibi\ACSGROUP.ALPHA"
FILEDEF ACSGROUP DIR \C:\ibi\ACSGROUP.ALPHA
-*FILEDEF ACSGROUP DISK \\C:\ibi\ACSGROUP.ALPHA
DEFINE FILE SV_SHIPMENTS
SHIPDATE_YR/YY = SHIPDATE;
DELIVERY_DATE_YR/YY = DELIVERY_DATE;
BILL_DATE_YR/YY = BILL_DATE;
SELECT_YR/A3 = IF (SHIPDATE_YR EQ '2019' OR DELIVERY_DATE_YR EQ '2019' OR BILL_DATE_YR EQ '2019')
THEN 'YES' ELSE 'NOP';
CURR_USER/A100V=UPPER(REPLACE('jsutton', 'hills\', ''));
END
TABLE FILE SV_SHIPMENTS
PRINT *
-* SHIPDATE
-* SHIPDATE_YR
-* DELIVERY_DATE_YR
-* BILL_DATE_YR
BY MASTER_CLIENT_NAME NOPRINT
WHERE MASTER_CLIENT_NAME EQ 'ACS GROUP';
WHERE SELECT_YR EQ 'YES';
WHERE SV_SHIPMENTS.SV_SHIPMENTS.LOGIN_ID EQ CURR_USER
-*WHERE RECORDLIMIT EQ 10
-*ON TABLE PCHOLD FILENAME 'C:\ibi\ACSGROUP' FORMAT ALPHA
-*ON TABLE SAVE AS 'C:\ibi\ACSGROUP' FORMAT ALPHA
ON TABLE PCHOLD FORMAT WP
END
-RUN
-EXIT
WebFOCUS 8.2.06 SQL Server HTML, PDF, Excel, etc
October 04, 2019, 01:04 PM
FP Mod Chuck
I was looking to see if you had a style sheet that might have some wrapping syntax but you don't even reference one so I really don't know why the data is wrapping.
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 04, 2019, 04:43 PM
AMC2
My sentiments also.
WebFOCUS 8.2.06 SQL Server HTML, PDF, Excel, etc
October 06, 2019, 02:41 PM
Doug
Have you considered 'APP HOLDMETA' and 'APP HOLDDATA' before your TABLE FILE request. I use them for, what I consider, the easiest way to accomplish this result. WARNING: Be careful not to overwrite some file that should not be overwritten.
October 07, 2019, 08:50 AM
jgelona
Any chance your data has embedded Line Feed characters? That will cause you data to mysteriously wrap. I used this to dump a file with a 4000 character text field. I got no wrapping except when there were embedded line feed character in the field.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
October 07, 2019, 01:07 PM
AMC2
I did try APP HOLDMETA and APP HOLDDATA and did not have success.
Yes, I think the data may contain some embedded line feed characters or something.
I think generating it directly into an Excel file will serve the purpose though.
Thanks for your help.
WebFOCUS 8.2.06 SQL Server HTML, PDF, Excel, etc
October 07, 2019, 09:05 PM
StuBouyer
When you FILEDEF to C: (or other) drive it relative to the Reporting server, not to the machine you are connecting from.
If PCHOLD is causing issues for you you can try the following:
Note: for WebFOCUS to be able to write to the share it will probably need to be running as an AD user and the LOCAL_SYSTEM user is not able to see shares by default.
A quicker and far simpler option may be to have your admins create a share to the APP folder you are going to drop the file into and give you read/write access to that share
Cheers
Stu
Edit to update signature
WebFOCUS 8.2.03 (8.2.06 in testing)
October 08, 2019, 04:45 PM
AMC2
Ok thanks. It is running as an AD user. Thanks for your post.