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 am trying to setup and FTP job with dynamic FTP name with date in the report name. I followed the ibi instructions but I think I am missing something out in the code. When I run my reportcaster FTP schedule I get error message the &NAME is missing a value. "Task error: A VALUE IS MISSING FOR: &NAME No report to distribute."
Any idea what I might be doing wrong? My test report name is CAR.HTM
-SET &MONTH = SUBSTR(8, &DATE, 1, 2, 2, A2);
-SET &DAY = SUBSTR(8, &DATE, 4, 5, 2, A2);
-SET &YEAR = SUBSTR(8, &DATE, 7, 8, 2, A2);
-SET &NAME = (&YEAR || &MONTH || &DAY || '-SONJ_Car.htm' ); -*'-SONJ_REPORT.PDF'
FILEDEF SONJ DISK D:\IBI\64bit\APPS\TEST\SONJ
-RUN
-WRITE SONJ NOCLOSE &NAME
-CLOSE SONJ;
--*This is the support document I followed form iibi support site
How to send a report to an FTP site with a timestamp?
Solution:
1. Modify the edasprof.prf in ibi\srv53\wfs\etc to include:
SET ASNAMES = ON
2. Create a folder called TEST under the ibi\apps directory and add it to the
APP Path.
3. Create a MASTER file called (SONF.mas) in the folder: ibi\apps\baseapp
(usually already part of the APP Path) and include the contents:
FILE=SONJ, SUFFIX=FIX, DATASET='C:\IBI\APPS\TEST\SONJ'
SEGNAME=SEG01, SEGTYPE=S2, $
FIELD=FTP_FILENAME, ALIAS=FTP, USAGE=A40, ACTUAL=A40, $
4. Create a FOCEXEC in the ibi\apps\ibisamp folder called: POSTP.fex
which will create the file and append the datestamp, with the following
contents:
-SET &MONTH = SUBSTR(8, &DATE, 1, 2, 2, A2);
-SET &DAY = SUBSTR(8, &DATE, 4, 5, 2, A2);
-SET &YEAR = SUBSTR(8, &DATE, 7, 8, 2, A2);
-SET &NAME = (&YEAR || &MONTH || &DAY || '-SONJ_REPORT.PDF');
FILEDEF SONJ DISK C:\IBI\APPS\TEST\SONJ
-RUN
-WRITE SONJ NOCLOSE &NAME
-CLOSE SONJ;
5. Create a FOCEXEC in ibi\apps\ibisamp called: DYNAMIC.fex,
which will take the report and ftp it:
TABLE FILE SONJ
PRINT FTP_FILENAME AS 'DEST'
ON TABLE PCHOLD
END
6. Create a new schedule in ReportCaster, with any description.
7. Create a new task using a WF Server Procedure (any WF Server Procedure that
should be scheduled)
8. In the Advanced tab go to Procedures.
8. For the Fist POST-processing Procedures specify: POSTP
9. For Distribution select FTP and fill in all necessary FTP information.
10. For Distribution Information Select Dynamic List.
11. Click on the green icon on the right and select DYNAMIC as the
Procedure Name.
12. In the settings tab select Never for notification.
13. Click Apply and OK for ReportCaster to execute this task.
14. Logon to the FTP site that was specified in the schedule and confirm
a file called "todays date-SNJ_Report.PDF" (050407-SNJ_REPORT.PDF)
was uploaded.
15. Check the directory: ibi\apps\TEST for a a file called SONJ which will
not have an extension. Open this file in notepad and it will have the
ftp'd filename.
This message has been edited. Last edited by: Kerry,
I have a job where I want the report copied somewhere with the timestamp. I just run the report to a certain location...then have a command that copies it with the date stamp. Runs in Reportcaster every day. Maybe you could do something like this.
Any one here using Dynamic Names Date + Report name using report caster? If yes, can you help me resolve my issue? Is FTP_FILENANE reserved word or my actually output file name?This message has been edited. Last edited by: Arif,
If not, our technicals suggested that it would be better to open a case with Customer Support Services for further assistance, as this is a relatively complicated issue, and we may need to look into your logs, traces, and/or screenshot to better understand the issue. To open a case, please either call at 1-800-736-6130, or access online at InfoResponse.
Cheers,
Kerry
Kerry Zhan Focal Point Moderator Information Builders, Inc.
Posts: 1948 | Location: New York | Registered: November 16, 2004
Originally posted by Arif: Okay I got lil far with it. I am getting the following error now:
Dynamically creating distribution information ibisamp/dynamic: Unable to retrieve data for the distribution list
My Dynamic procedure has following code any idea if I need to type destination address or its correct?
TABLE FILE SONJ
PRINT FTP_FILENAME AS 'DEST'
ON TABLE PCHOLD
END
Arif, If you are building a dynamic distribution list I think the output needed to be alpha format. I'm looking for the file i created to do something similar but i can't find it.
Try changing
ON TABLE PCHOLD
to
ON TABLE PCHOLD FORMAT ALPHA
WebFOCUS App Studio 8.2.02 Windows 7, All Outputs
Posts: 141 | Location: Mclean, VA | Registered: December 04, 2012
Assuming you are on windows, have you tried to build a .bat file to do the ftp. We are on Linux and do this all the time with a Linux script (.sh) file. Here's an example where the file on the destination server has a suffix of the date and time. [/code] Here's the script:
-* -* FTP Foster Care Claims to Finance -* -SET &PASS=0; -* -BEGINFTP -SET &PASS=&PASS+1; -IF &PASS GT 6 THEN GOTO ERROROUT; -* -SET &CURRTM=HHMMSS('A8'); -SET &CURRTM=EDIT(&CURRTM,'99:$99:$99'); -SET &CURRDT=&YYMD; -UNIX . &APPROOT/finance/ftp649.sh &CURRDT &CURRTM -* -* Check status of ftp - If it failed sleep for an hour and try again -* FILEDEF FTPLOG DISK &APPROOT/msgfiles/ftp649_&CURRTM...&CURRDT ( LRECL 160 RECFM V -* TABLE FILE FTPLOG COUNT LDATA WHERE LDATA EQ '226 File transfer completed successfully.' ON TABLE SAVE END -RUN -* -READ SAVE &PUTSTSFC.5. -RUN -IF &PUTSTSFC GT 0 THEN GOTO FINISHED; -* -* ftp fialed so sleep for 1 hour and try again, stop trying after 6 hours. -* -UNIX sleep 1h -GOTO BEGINFTP -* -* ftp of foster care claims failed, send notice -* -ERROROUT -* -SET &RCJOBID=S71d6a31dsf224s4d36sa63ds7fbc8091577c; -INCLUDE RC_SUBMIT -* -FINISHED [/code]
In the script, the $1 is the current date and $2 is the time. These are set in the fex when the fex runs the script ftp649.sh. The script sends the messages that normally appear on the screen to a log file.
When control passes back to the fex the log file is examined to make sure the ftp worked. If it works, the procedure ends. If it fails, it sleeps for 1 hour then tries again. It will try for 6 hours. If a successful ftp is not completed within 6 hours, the fex tells Report Caster to run a report to let me and my team know the ftp did not work.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006