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     filename with the current date in it

Read-Only Read-Only Topic
Go
Search
Notify
Tools
filename with the current date in it
 Login/Join
 
<geetha>
posted
Hi all,

I have to send an excel file using report caster ftp option and the name of the file, I am sending should have the current date in it everyday. for example today,it should be report-2004-12-06.xls.

Please help me if some one out there has done like this.
 
Report This Post
Master
posted Hide Post
geetha,

One way to do this would be to have another focexec procedure that create a distribution file. This file would have to be stored/updated where the report caster server could find it. This procedure should be schedule with report caster and then if Report Caster and the WebFOCUS Reporting Server are on the same box just save it to the local drive where caster could find it else you could ftp it where caster could find it for the Real Job. This procedure must be ran before the Real Job so that caster see's the new name. Hope this helps.
 
Posts: 865 | Registered: May 24, 2004Report This Post
<geetha>
posted
Hi TexasStingray,

Thank you for your suggestions. I was looking into the report caster documentation, it says that we can have dynamic address list as follows.

Dynamic Address. You can select a dynamic address list by clicking the Choose address button . A dynamic address list enables you to return in memory either a list of burst values and destinations, or only a list of destinations from a data source (for example, a flat file, SQL database, FOCUS data source, or LDAP). You must code a FOCUS procedure (FOCEXEC) that is available to the path of the server defined in either the server's profile (edasprof.prf) or the user's profile. The procedure must return the distribution information (using the PCHOLD command) with the data in a specific layout that you define. This layout must contain specific values and destinations so that ReportCaster can identify and process the information returned.

The following is a sample Master File for FTP distribution information located in a text file.


FILE=MYADDR ,SUFFIX=FIX
SEGNAME=SEG01 ,SEGTYPE=S02
FIELDNAME =BURST_VALUE ,BURST ,A50 ,A50,$
FIELDNAME =FTP_FILENAME ,FTP ,A40 ,A40,$


The following is a sample request (procedure) for bursting. The column names and the order in which they are returned must be 'VALUE' and then 'DEST'.


SET ASNAMES=ON;
TABLE FILE MYADDR
PRINT BURST_VALUE AS 'VALUE'
FTP_FILENAME AS 'DEST'
ON TABLE PCHOLD
END


The following is a sample request (procedure) for non-bursting. In this case, the 'VALUE' column does not need to be provided since bursting is not required.


SET ASNAMES=ON;
TABLE FILE MYADDR
PRINT FTP_FILENAME AS 'DEST'
ON TABLE PCHOLD
END

Note: If the column names are not VALUE and DEST, you must add a SET ASNAMES=ON; qualifier before the TABLE FILE statement.

So according to that, can I replace FTP_FILENAME in the text file with the filename and concate the date variable in it.

Thanks,
Geetha
 
Report This Post
Platinum Member
posted Hide Post
See if this works for you.

-SET &TODAY = &MDYY;
-SET &NAME1 = 'RPT'||&TODAY;
-SET &NAME2 = &NAME1||'.XLS';
FILEDEF &NAME1 DISK c:\ibi\apps\samples\&NAME2
-***
TABLE FILE CAR
SUM SALES
BY COUNTRY
ON TABLE SAVE AS &NAME1 FORMAT EXL2K
END
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Report This Post
Master
posted Hide Post
According to what you have posted Try Something like this.

-SET &TODAY = EDIT(&YYMD, '9999-99-99');

SET ASNAMES = ON

DEFINE FILE CAR
FTPLOC/A40 = '/localhost/reports/report-' | '&TODAY' | '.xls';
END

TABLE FILE CAR
PRINT FTPLOC AS 'DEST'
BY COUNTRY NOPRINT
WHERE RECORDLIMIT EQ 1
ON TABLE PCHOLD
END
 
Posts: 865 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
go with Spence's answer.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<geetha>
posted
Thank you so much,

you guys solved my problem. I am fairly new to IBI web focus, and trying to learn.

I appreciate your quick responses!!!
 
Report 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     filename with the current date in it

Copyright © 1996-2020 Information Builders