Focal Point
[CLOSED] Can the distribution file in RC have a variable for the path

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/115104951

June 22, 2009, 05:56 PM
BobSh
[CLOSED] Can the distribution file in RC have a variable for the path
We are on UNIX and try to use variables whenever possible. A ReportCaster schedule is burst using a distribution file on UNIX. I would like to use a variable for the path to the distribution so we don't need to hard-code the path in each schedule. I tried setting a global WF variable &&WF_ITNAS and I tried setting a UNIX variable with 'export WF_ITNAS=. Neither one worked. It does not look like RC resolves the variables. Does anyone have an idea how to use a variable for the path to find the distribution file?

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


WebFOCUS 7.7.05M, gen 144, Windows 2008 Server R2 64-bit, Tomcat 6.0.33, IIS 7.0, SQL Server, Excel 2013, PDF, HTML, FOCUS files.
June 22, 2009, 06:00 PM
BobSh
My signature file was old. We are one WF/RC 7.6.6. Thanks.


WebFOCUS 7.7.05M, gen 144, Windows 2008 Server R2 64-bit, Tomcat 6.0.33, IIS 7.0, SQL Server, Excel 2013, PDF, HTML, FOCUS files.
June 22, 2009, 08:17 PM
susannah
You can use a DYNAMIC distribution list(read up on that), rather than a fixed one. a Dyn list is a fex, makes an xml output.
but you're going to have to pass something to the list fex to determine the path, right?... and that distribution fex doesn't take a parameter from the schedule ... at least i've never thought of just concatenating an &var to the end of the pth/fexname in the distribution page.
hmmm.
what's 'Control-M' ?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 23, 2009, 08:19 AM
PBrightwell
You can also use UNIX FTP commands in your fex. You will get a "No Report to Distribute" from ReportCaster if you do this.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
June 23, 2009, 10:46 AM
BobSh
The variable I want is not the name but the environment. For instance, the path to where the output is written on our Prod server is /dwh/prd/app/tcs. On our Test server it is /dwh/tst/app/tcs. I would like the environment (prd, tst, dev) to be a variable so that I could set the value in 1 place on each server and not have to change it for each schedule. The output filename is static. We are not allowed to FTP to internal servers.


WebFOCUS 7.7.05M, gen 144, Windows 2008 Server R2 64-bit, Tomcat 6.0.33, IIS 7.0, SQL Server, Excel 2013, PDF, HTML, FOCUS files.
June 23, 2009, 12:16 PM
Darin Lee
That sounds like a good idea for a new feature request. Bad news is that the product doesn't currently allow for that. The dynamic distribution list that Susannah mentions allows you to specify different servers, but the destination directory does not take a variable, nor is it acessible by a dynamic distribution list. It is either hard coded, or takes the default directory of the user name being used in the FTP process. Probably your only hope is to have duplicate jobs for Test and Prod, and either using different user id's (which have their default directory set to the desired location) or hard-coding the desired location (which seems like it would be harder to manage.)

Manually performing the FTP process, as Pat suggests, is probably the only other option, for now.


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
June 23, 2009, 04:42 PM
susannah
Bob
do you have 3 environments?... 3 servers, with 3 separate reportcasters running?
if so, do this:
1) in the edasprof, create a variable
-SET &&basefilepath = '/dwh/prd/apps/tcs';
where the prd bit changes for each server.
2) in your caster job, use a fex to create the distribution list (so, in setting upthe job, select dynamic distributionlist, and point to the fex)
and the fex looks like this:
FILEDEF MYLIST DISK &&basefilepath|/mylist.txt
TABLE FILE MYLIST
PRINT emailaddress AS VALUE
-* BY userid AS DEST
ON TABLE PCHOLD FORMAT XML
END
... the BY userid AS DEST is only if you're bursting
.... and for extra credit, see if you can figure out how you would create carbon copies for a burst list...




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 24, 2009, 10:15 AM
BobSh
Thanks Susannah. I'll investigate that. If successful, I'll add a posting.


WebFOCUS 7.7.05M, gen 144, Windows 2008 Server R2 64-bit, Tomcat 6.0.33, IIS 7.0, SQL Server, Excel 2013, PDF, HTML, FOCUS files.