Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]ftp of files from webfocus server

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]ftp of files from webfocus server
 Login/Join
 
Platinum Member
posted
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)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Virtuoso
posted Hide Post
Try:

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, 2007Report This Post
Platinum Member
posted Hide Post
What do you mean by outfile?


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Expert
posted Hide Post
OUTFILE is the "logical name" for the file you're trying to save.

Look up the FILEDEF command in the documentation.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Using this
 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)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Expert
posted Hide Post
Change the code to this and see.

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.

Then you set your SAVE AS to the pointer name.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
 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)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Expert
posted Hide Post
Are you able to repro this with one of the sample files that come with WebFOCUS ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
I tried running against the empdata file:

 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)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Expert
posted Hide Post
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,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Platinum Member
posted Hide Post
Tom,

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)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Member
posted Hide Post
quote:
D:\\FOCUS\SC\CSC\IT\OUT\COURSES.CSV


Just curious, but I thought the double backslash was for UNC names. Shouldn't this be D:\FOCUS\SC\CSC\IT\OUT\COURSES.CSV

G
 
Posts: 29 | Location: Seattle Washington | Registered: July 08, 2009Report This Post
Expert
posted Hide Post
G,

Do this agt the top of any fex:
? PATH
-EXIT

This will show the fully qualified path.

Malinda,

quote:

I tried using your code and it produced a .mas file as well as a .acx file but no .ftm like I was needing.


There are 5 folders with in an Application folder; the FTM file is in the OTHER folder under:
 
Environment 
  EDASERVE
    Applications
      Baseapp
        HTML Files
        Maintain Files
        Master Files
        Other     <------- The ftm is in here
        Procedures


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
quote:
There are 5 folders with in an Application folder
shown within dev studio .... but they are virtual folders and not physical.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]ftp of files from webfocus server

Copyright © 1996-2020 Information Builders