If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

cm.outputScript is not kicking off my script

Started by tpaddack, 22 Jun 2007 06:28:36 PM

Previous topic - Next topic

tpaddack

I am trying to FTP a report to an outside vendor using our Cognos platform.

So far I have made the necessary edit to the Cognos Content Manager Server by adding the variables cm.outputLocation and cm.outputScript.  I have even made the change in Cognos Configuration to allow the server to output the files. 

We now have Cognos outputting saved reports to the location described by cm.outputLocation.  I have written a simple .bat file (4 lines of code)  to move a file to the FTP server, but the script does not seem to get kicked off. A file is saved to the location in cm.outputLocation, but the script is not successful.  I can run the .bat file from the command line window, so I know the script works.

Just for fun, I wrote a more robust little Java App that will FTP the file once the name is passed in.  I call the Java App form a .bat file.  As above, it runs from the command line just fine.  but Cognos refuses to kick it off.

Any ideas about what I am missing?

sir_jeroen

have you looked in the cognos KB? There's a sample script file in it....

tpaddack

Yes, the script contained:

@echo off
ren *.xml *.xzy



No dice.  Any ideas?

trevorp

#3
Hi


1) Is the dos script on the server where the report is saved?
2) Have you included the path to the script on the C8 settings

You need cm.outputLocation D:/Path  and  cm.outputScript D:/Path1/dos.bat

Also note that 2 files are saved (1 an XML with the report name etc etc and 1 with the actual data and both will be named the same e.g. a_123 etc etc .xml and a_123 etc etc .pdf).

There is a script (VB I think) on the Knowledge base for renaming Burst Reports) i also have an old Cognos Macro the can rename most of the C8 outputs if u r interested.


Trevor

tpaddack

Thanks for the help guys.

I finally found the issue.  Cognos was workign fine and kicking off the script.

The problem was that for identifying files that needed to be processed I was assuming that, much like opening a script in the CMD window, in the directory the script is in, Cognos woudl do the same.  And if it did do that, then I could use RELATIVE paths to identify files.  But since Cognos is running the script at the server level, one has to give the ABSOLUTE path so the script can find the files.

Duh.  Oh well.  I've not written many scripts and now I know. I know.  It's a beer league mistake. Oh well.
Cheers,

T

cognos_guru

Does 1) Mean the dos script has to be in the exact same folder as where the reports are saved?

Quote from: trevorp on 27 Jun 2007 06:29:34 AM
Hi


1) Is the dos script on the server where the report is saved?
2) Have you included the path to the script on the C8 settings

You need cm.outputLocation D:/Path  and  cm.outputScript D:/Path1/dos.bat

Also note that 2 files are saved (1 an XML with the report name etc etc and 1 with the actual data and both will be named the same e.g. a_123 etc etc .xml and a_123 etc etc .pdf).

There is a script (VB I think) on the Knowledge base for renaming Burst Reports) i also have an old Cognos Macro the can rename most of the C8 outputs if u r interested.


Trevor

tpaddack

Wow, that was from 3 years ago.

In answer to your queries:
1) the DOS script is on the Content Manager server
2) the path to the script is on the Content Manager Service as a server parameter

That renaming script could be handy.