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] Two output distributions

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Two output distributions
 Login/Join
 
Platinum Member
posted
I've got a fex that somebody else wrote and the output gets filedeffed to a shared folder. But, I also need to FTP the output from ReportCaster. So, I kind of need a way for the same fex to both output to a folder and SET ONLINE-FMT TXT, so that I can FTP it. I know there are probably several ways to do this, and I could do it myself, but probably not as efficiently and easily as somebody on this board. Thanks for your help!

This message has been edited. Last edited by: Kerry,


Windows version 768
 
Posts: 215 | Registered: March 16, 2006Report This Post
Expert
posted Hide Post
Mark1,
you can have your fex post the output directly to an ftp site before it creates the emailable or postable version. You can post an htm file to an ftp site.. you can post anything you can think up to an ftp site...but i take it you want a text version, is that right?
ok
we'll do it in 3 steps
1) make the extract file
2) make a text version of the data and write your own ftp script to upload it
3) make the pretty version for parking on a shared folder.
1)
TABLE FILE CAR
PRINT SALES BY COUNTRY
ON TABLE HOLD AS MYEXTRACT
END
2)
FILEDEF FTPDATA DISK FTPDATA.TXT
TABLE FILE MYEXTRACT
PRINT * ON TABLE HOLD AS FTPDATA FORMAT ALPHA
END
-RUN
FILEDEF CHFTP DISK PUT.FTP
-RUN
-WRITE CHFTP open ftp.yourftpsite.com
-WRITE CHFTP youruserid
-WRITE CHFTP yourpassword
-WRITE CHFTP ascii
-WRITE CHFTP cd directoryname
-* you won't need to change your local directory
-* because you'll be using your agent dir
-*WRITE CHFTP lcd \
-*WRITE CHFTP lcd localdirname
-* you won't need to GET , you'll need to PUT
-*WRITE CHFTP get filename
-WRITE CHFTP put FTPDATA.TXT
-WRITE CHFTP close
-WRITE CHFTP quit
-RUN
-* now this command executes the little script you've just written
DOS ftp -i -s:PUT.FTP
-RUN
3)
-* now make your pretty report to park on your shared drive
FILEDEF MYREPORT DISK \\servername\..\MyReport.htm
TABLE FILE MYEXTRACT
PRINT *
ON TABLE HOLD AS MYREPORT
ON TABLE SET STYLE *
...
END
-* and that should do it.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Rather than have to action the second table request, you could issue the second HOLD immediately after the first table request -

TABLE FILE CAR
PRINT SALES BY COUNTRY
ON TABLE HOLD AS MYEXTRACT
END
HOLD AS FTPDATA FORMAT ALPHA
-RUN


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
Platinum Member
posted Hide Post
Thank y'all very much! Between these two, I will be able to accomplish what I need. One question, Susannah... I notice that you have merely the ftp site, name and password. However, on ReportCaster you have to fill in Server name, Directory, username and password. We are trying to FTP to another organization's server, not one of our servers.

So, what's the deal with that? Why does ReportCaster need the extra info?

We have been putting an IP address in the Server Name, but the recipient says that is not accurate because the server IP address is dynamic.


Windows version 768
 
Posts: 215 | Registered: March 16, 2006Report This Post
Expert
posted Hide Post
I'm not using RC to contact the ftp server.
My fex will do it by writing a script.
i just need the static internet address of the outside customer's ftp server.
So ask your customer for their STATIC ftp server address.
and...further...the 'output format' in RC is completely irrelvant, as your fex is making 2 separate files and parking them as you instruct, so there is nothing to distribute.
The distribution method can also be anything you want because nothing gets distributed.
You could, of course, end your fex with some sort of status report and email it to yourself.
By handling the ftp by yourself , you're retaining full control ; you can move among directories at will, do status checks, etc, and you're not dependent on an intermediary.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Susannah, I model after your FTP commands and am having Invalid command at the point -WRITE CHFTP open ..

FILEDEF CHFTP DISK PUT.FTP
-RUN
-WRITE CHFTP open 155.17.111.9
-WRITE CHFTP pid.File
-WRITE ...
-WRITE ....

ftp> ftp> open 155.17.111.9
Invalid command.
ftp> pid.File
Invalid command.
....
....
What am I missing? I run this within MRE. Have to do with firewall? Or some other security issue? Let me know if anyone having the same issue. Thank you.


WF 7.6X
WinXP
MS SQL Server 2000
Excel, PDF, HTML, AHTML
 
Posts: 8 | Location: Texas | Registered: May 23, 2004Report This Post
Platinum Member
posted Hide Post
The request worked for me (Great technique by the way Susannah).

Highly recommend that you view the contents of PUT.FTP and actually try running it via a command console to help figure out what's wrong.

based upon your error: ftp> ftp> open 155.17.111.9

it looks like you're actually invoking another FTP command within, so the session was never established.
 
Posts: 140 | Registered: May 02, 2007Report This Post
Member
posted Hide Post
I figured out that the port was blocked. Thank you for your reply.


WF 7.6X
WinXP
MS SQL Server 2000
Excel, PDF, HTML, AHTML
 
Posts: 8 | Location: Texas | Registered: May 23, 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] Two output distributions

Copyright © 1996-2020 Information Builders