As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I have everything set up that I am able to get the file I am running saved to the webfocus server. I then am able to see the file and ftp it.....
My problem is actually that I had the file set up to be a csv file and am using the dfix command so that there are no trailing blanks. When I combine the dfix with the ftp command it will not run the program and tells me that the server has crashed due to some unknown error.
When I do this command
ON TABLE SAVE FILENAME "D:\\FOCUS\SC\CSC\IT\OUT\COURSES.CSV" FORMAT DFIX DELIMITER , ENCLOSURE " HEADER NO
I get the error.
When I use this instead:
ON TABLE SAVE FILENAME "D:\\FOCUS\SC\CSC\IT\OUT\COURSES.CSV FORMAT DFIX DELIMITER , ENCLOSURE " HEADER NO
It will output the file but names it "courses.csv format dfix delimiter , enclosure" because that is really what is included in my quotes. The output looks pretty good except for it has those trailing blanks. I have tried to switch out my symbols that that does not help either. What I need is for it to run the program, output it on the ftp server and output it as a csv file without trailing blanks. These all work individually but not when you put them together.
HELP!!!This message has been edited. Last edited by: Malinda,
WebFOCUS 7.6.11 Windows all output (Excel, HTML, PDF)
FILEDEF OUTFILE DISK D:\\FOCUS\SC\CSC\IT\OUT\COURSES.CSV
TABLE FILE <filename>
.
.
ON TABLE SAVE AS OUTFILE FORMAT DFIX DELIMITER , ENCLOSURE " HEADER NO
END
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
FILEDEF FILENAME DISK D:\\FOCUS\SC\CSC\IT\OUT\COURSES.CSV
TABLE FILE CALLHLD
PRINT
'CALLHLD.SEG01.TERM'
'CALLHLD.SEG01.SITE_ID'
'CALLHLD.SEG01.START_DATE'
'CALLHLD.SEG01.TITLE'
'CALLHLD.SEG01.COURSE_ID'
'CALLHLD.SEG01.DESC'
'CALLHLD.SEG01.PUBLISH'
'CALLHLD.SEG01.END_DATE'
'CALLHLD.SEG01.TEMPLATE'
BY 'CALLHLD.SEG01.TERM' NOPRINT
BY 'CALLHLD.SEG01.COURSE_ID' NOPRINT
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SAVE AS COURSES.CSV FORMAT DFIX DELIMITER , ENCLOSURE " HEADER NO
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
I still get the "unknown error occurred" message.
WebFOCUS 7.6.11 Windows all output (Excel, HTML, PDF)
FILEDEF CSV_CRSE DISK D:\\FOCUS\SC\CSC\IT\OUT\COURSES.CSV
TABLE FILE CALLHLD
PRINT
'CALLHLD.SEG01.TERM'
'CALLHLD.SEG01.SITE_ID'
'CALLHLD.SEG01.START_DATE'
'CALLHLD.SEG01.TITLE'
'CALLHLD.SEG01.COURSE_ID'
'CALLHLD.SEG01.DESC'
'CALLHLD.SEG01.PUBLISH'
'CALLHLD.SEG01.END_DATE'
'CALLHLD.SEG01.TEMPLATE'
BY 'CALLHLD.SEG01.TERM' NOPRINT
BY 'CALLHLD.SEG01.COURSE_ID' NOPRINT
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SAVE AS CSV_CRSE FORMAT DFIX DELIMITER , ENCLOSURE " HEADER NO
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
The FILEDEF Command creates a named pointer to a file.
FILEDEF CSV_CRSE DISK D:\\FOCUS\SC\CSC\IT\OUT\COURSES.CSV
TABLE FILE CALLHLD
PRINT
'CALLHLD.SEG01.TERM'
'CALLHLD.SEG01.SITE_ID'
'CALLHLD.SEG01.START_DATE'
'CALLHLD.SEG01.TITLE'
'CALLHLD.SEG01.COURSE_ID'
'CALLHLD.SEG01.DESC'
'CALLHLD.SEG01.PUBLISH'
'CALLHLD.SEG01.END_DATE'
'CALLHLD.SEG01.TEMPLATE'
BY 'CALLHLD.SEG01.TERM' NOPRINT
BY 'CALLHLD.SEG01.COURSE_ID' NOPRINT
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SAVE AS CSV_CRSE FORMAT DFIX DELIMITER , ENCLOSURE " HEADER NO
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
And I still get the unknown error occurred message......?!?!?!?!
WebFOCUS 7.6.11 Windows all output (Excel, HTML, PDF)
FILEDEF CSV_CRSE DISK D:\\FOCUS\SC\CSC\IT\OUT\FTPTEST.CSV
TABLE FILE EMPDATA
PRINT
'EMPDATA.EMPDATA.LASTNAME'
'EMPDATA.EMPDATA.FIRSTNAME'
'EMPDATA.EMPDATA.DEPT'
'EMPDATA.EMPDATA.JOBCLASS'
'EMPDATA.EMPDATA.SALARY'
BY 'EMPDATA.EMPDATA.PIN'
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SAVE AS CSV_CRSE FORMAT DFIX DELIMITER , ENCLOSURE " HEADER NO
and still get the unknown error occured message.
WebFOCUS 7.6.11 Windows all output (Excel, HTML, PDF)
From the documentation, I bolded the significant sentence:
quote:
Reference: FORMAT DFIX Description: Creates a delimited output file. You can specify the delimiter, whether alphanumeric fields should be enclosed within a special character such as a double quotation mark, and whether the file should be generated with a header record containing the field names.
For more information, see Creating a Delimited Sequential File.
Use: For importing data to Windows-based applications such as MS Access and Excel.
Supported with the command: HOLD, PCHOLD. Available in: WebFOCUS, Developer Studio, FOCUS.
I have saved it into BASEAPP, where it is a FTM.
RENAME it and FTP the file; Code:
APP PREPENDPATH IBISAMP
APP HOLD BASEAPP
-RUN
TABLE FILE EMPDATA
PRINT
'EMPDATA.EMPDATA.LASTNAME'
'EMPDATA.EMPDATA.FIRSTNAME'
'EMPDATA.EMPDATA.DEPT'
'EMPDATA.EMPDATA.JOBCLASS'
'EMPDATA.EMPDATA.SALARY'
BY 'EMPDATA.EMPDATA.PIN'
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS CSV_CRSE FORMAT DFIX DELIMITER , ENCLOSURE " HEADER NO
END
-RUN
-SET &DAT = 'Course_' || &YYMD || '.csv';
-*Rename the file to .csv from .ftm first.
-WINNT RENAME d:\ibi\64bit\apps\baseapp\CSV_CRSE.ftm &DAT
-* now we'll copy from reporting server to xfer server
-XSHARE
FTP code here
-EXIT
Final Output File to be FTP'd: Course_20100810.csv
From Developer Studio:
HELP click it CONTENTS click it SEARCH Type DFIX Click List Topics
Fairly straight-forward...This message has been edited. Last edited by: Tom Flynn,
Thanks for the tips....I tried using your code and it produced a .mas file as well as a .acx file but no .ftm like I was needing. I did though after seeing your hint that dfix is supported with hold, switch the code waz suggested and used on table hold instead of save and it worked!
Thanks for the hints everybody!
WebFOCUS 7.6.11 Windows all output (Excel, HTML, PDF)