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'm looking for a way to FTP a file out to a web server on a scheduled basis, Caster right?
Here's the issue, the file is a concatenation of two different record formats. (email address book)
The first record is static string and used as a header row for the output, the detail records are dynamic and need to be in a CSV format.
I'm having trouble building the file so the output is in the right format and still get Caster to distribute it.
So far what I've done is create a flat file with the first record then appended the details onto it.
It creates the output correctly if I use HOLD but Caster won't distribute it. If I use PCHOLD the APPEND is ignored so there's no header row on the output.
I'm open to any suggestions on how to get to the desired result but here's what I have at this point:
Here's one possibility - after you've created both pieces of the file, do an ON TABLE HOLD. Then FILEDEF and read that file as a fixed format with an alternate MFD that is basically FILENAME=FIXFILE, SUFFIX=FIX , $ SEGMENT=FIXFILE, SEGTYPE=S0, $ FIELDNAME=FIELD1, ALIAS=FIELD1,USAGE=A200,ACTUAL=A200,$
with format for however long the longest line might be. You should be able to output in whatever text or fixed format you need from there and FTP it as needed.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Thanks for your time Darin, hadn't thought of that but it seems perfectly reasonable.
After posting I tried using an OS script to move the file after the fact. So now I'm digging around to see if Windows DOS commands can be inbedded in the FEX, guessing the answer is yes I've just never done it...
Absolutely. You can use dos commands on the Windows platform to accomplish a lot of these things including a "manual" automated FTP script. I was assuming that you were wanting to stick with RC as the vehicle, but that doesn't have to be the case.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
FILEDEF CARTEST DISK D:\ibi\apps\weitznetdirectory\CARTEST.TXT (APPEND TABLE FILE CAR PRINT CAR MODEL SEATS BY COUNTRY NOPRINT ON TABLE HOLD AS CARTEST FORMAT COM END
FILEDEF FIXFILE DISK D:\ibi\apps\weitznetdirectory\CARTEST.TXT -RUN
TABLE FILE FIXFILE PRINT * END
***** Make sure to check the RC output format used with this or the quotes may get added back to the first row
2) Use DOS - Ah-Ha for the day!
****** FEX to APPEND detail rows
FILEDEF CARTEST DISK D:\ibi\apps\weitznetdirectory\CARTEST.TXT (APPEND TABLE FILE CAR PRINT CAR MODEL SEATS BY COUNTRY NOPRINT ON TABLE HOLD AS CARTEST FORMAT COM END
DOS ftp -s:\ibi\apps\weitznetdirectory\car.bat -RUN
****** car.bat
open 123.12.12.123 username password cd /directory/directory put D:\ibi\apps\weitznetdirectory\CAR.NAB quit
******
Top of mind thought is solution 1 will work well for formats allowed for in RC and keeps everything in one place so you don't have to remember while solution 2 will handle things RC doesn't, like an address book import file.
Thanks again Darin & Carol, your help was much appreciated!
Steve
WF 7.6.12 Reporting, 7.6.11 Client, MS Windows 2003 64, HTML/PDF/EXL2K/AHTML
i would have taken the truly lazy way out... and the 2nd file DEFINE FILE CAR COMMA/A1=','; CAR2/Ann='"' | CAR | '"'; ..etc END TABLE FILE CAR PRINT CAR2 COMMA MODEL2 COMMA SEATS BY COUNTRY NOPRINT ON TABLE HOLD AS CARTEST FORMAT ALPHA END
might have slapped an LRECL 80 or somesuch on my first filedef.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003