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

Using a batch file to run cubes

Started by robinsks, 30 May 2008 08:18:09 AM

Previous topic - Next topic

robinsks

Hi,
I realise that this is not strictly a new topic..but the replies and code examples provided on this and other sites for writing a batch file to run cognos cubes are all different. I have tried all versions of the code with no success and I wander if anyone can please help.

My latest rendition is:-

start trnsfrmr.exe -n2 -s -k DBNAME=userid/pw model_name.pyj

which is in a batch file. I have not used the complete paths in this example code as I wanted to keep this example as simple as possible. The version of transformer that I am using is 8.3. The above code seems to run with no errors but no cube is built. As I say each previous answer to this question is different.I am not sure if this is because they apply to different versions of transformer or not.

Ty Clabbers

Don't know about 8.3 (we have 8.1) but what does you logfile say? Useally there is a line there with the reason why there is no cube build.

Our batchfiles look something like this (again this works for 8.1):
echo
echo create variabele based on sysdate and time
set tijd_operationele_kubus=%date:~10,4%-%date:~4,2%-%date:~7,2%_%time:~0,2%%time:~3,2%

echo ---------------------------------------------------------------------------
echo build new cube
"D:\Program Files\Cognos\cer4\bin\trnsfrmr" -n2 -r4 -i -dLogFileDirectory="D:\cognos-data\Powerplay\Operationele kubus\output" -dMultiFileCubeThreshold=7500000 -dEnablePCOptimizer=1 -dDataSourceDirectory="D:\cognos-data\Powerplay\Operationele kubus\iqd" -dCubeSaveDirectory="D:\cognos-data\Powerplay\Operationele kubus\output\%tijd_operationele_kubus%" -dDataWorkDirectory="D:\cognos-data\Powerplay\TempCognos\Operationele Kubus" -dModelWorkDirectory="D:\cognos-data\Powerplay\TempCognos\Operationele Kubus" -dModelSaveDirectory="D:\cognos-data\Powerplay\Operationele kubus\output" -k<DATASOURCE>=<DATABASE USER>/<PASSWORD> "D:\cognos-data\Powerplay\Operationele kubus\model\operationele_kubus.mdl"

echo ---------------------------------------------------------------------------
echo rename the logfile
move "d:\cognos-data\powerplay\operationele kubus\output\operationele_kubus.log"         "d:\cognos-data\powerplay\operationele kubus\output\%tijd_operationele_kubus%_operationele_kubus.log"

echo ---------------------------------------------------------------------------
echo Move cubes from staging to working dir
xcopy  "d:\cognos-data\powerplay\operationele kubus\output\%tijd_operationele_kubus%"                              "\\<SERVERNAME>\d$\cognos-data\kubussen\operationele kubus\%tijd_operationele_kubus%\"  /Y /F /R /E
copy /b /y "d:\cognos-data\powerplay\operationele kubus\output\%tijd_operationele_kubus%_operationele_kubus.log"   "\\<SERVERNAME>\d$\cognos-data\kubussen\operationele kubus\%tijd_operationele_kubus%_operationele_kubus.log"

echo ---------------------------------------------------------------------------
echo attach cubes to the datasource
start "Operationele kubus"         /D"d:\Program Files\Cognos\c8MR2\webapps\utilities\cubeSwap" /B /WAIT cubeSwap.bat -dispatchername="http://%COMPUTERNAME%:9300" -datasource="Operationele kubus"         -url="http://%COMPUTERNAME%:9300/p2pd/servlet/dispatch" -username="XXXX" -password="XXXX" -namespaceid="Series7" -windowscube="D:\cognos-data\kubussen\operationele kubus\%tijd_operationele_kubus%\operationele_kubus.mdc"

echo ---------------------------------------------------------------------------
echo remove temp files (normally there are none)
del /Q /S "D:\cognos-data\Powerplay\TempCognos\Operationele Kubus"

echo ---------------------------------------------------------------------------
echo remove files from staging dir
rmdir /S /Q "d:\cognos-data\powerplay\operationele kubus\output\%tijd_operationele_kubus%"
del "d:\cognos-data\powerplay\operationele kubus\output\%tijd_operationele_kubus%_operationele_kubus.log"