Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macros and Scheduler, macro not running.

Status
Not open for further replies.

wolves

Programmer
Jan 26, 2001
130
US
I have a macro that I would like to run in Scheduler. I am using the CognosScript Editor to create the macro. But cannot get it to run. Any idea why it will not run?
It compiles with no errors.
Even when I execute the macro in the CognosScript Editor, nothing happens. Any ideas?

Thanks in advance?

Macro:

Code:
Sub Main()
dim i as integer
dim tmp1 as string
dim tmp2 as string
tmp1 = "c:\Program Files\cognos\cer3\bin\trnsfrmr.exe"
tmp2 = "D:\data\Task\Cognos Dev\SCHEDULER\Bill Pay Date.pyi"
i = Shell ( tmp1+" -n -s "+tmp2 )
End Sub





 
I suspect it's because DOS doesn't like the space between Program and Files in the path to transformer since it'll work on the command line if the contents of tmp1 are enclosed in quotes.
I can only think of re-installing transformer on a path without spaces - but then i'm not one for DOS.

soi la, soi carré
 
what about progr~1 (dos 8.3 notation?)

does the scheduler and macro work when you use this line:

i = Shell ( "c:\Program Files\cognos\cer3\bin\trnsfrmr.exe"+" -n -s "+"D:\data\Task\Cognos Dev\SCHEDULER\Bill Pay Date.pyi")

or

i = Shell ( "c:\Progr~1\cognos\cer3\bin\trnsfrmr.exe"+" -n -s "+"D:\data\Task\Cognos Dev\SCHEDULER\Bill Pay Date.pyi")

cheers,

Martijn
 
Martijn
That's almost it - substitute progra~1 for progr~1 and it works for me in 7.3 (with cer3 changed to cer4, naturally).

soi la, soi carré
 
Thanks. I did put the correct names without spaces ( progra~1) and (Cognos~1), so now yes, it does at least bring up the .pyi.

My understanding after reading the Cognos documents what that this would or could refresh my cube? Is this correct, or is this just limited to opening up my .pyi file and that's all.
 
That will refresh your cube. For a list of all the command line options, see the Contents/Index of the Help option in Transformer - there's too many to describe here.

soi la, soi carré
 
No worries - I'm sure that there are some IT guys out there who use hands to count binary...

soi la, soi carré
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top