Hi Lex
Thank you for your reply. It is not that the script is not running in the server at all. It is running fine for some days and giving the error sometimes. Not very consistent. What I have found from the log file produced by the transformer is as follows
When running corrcetly it is giving the following log
-------------------------------------------
PowerPlay Transformer(7.1.98.0 ) Fri Dec 12 14:53:54 2003
LogFileDirectory=f:\development\logs
ModelSaveDirectory=f:\development\transformer modelsDataSourceDirectory=f:\development\iqdCubeSaveDirectory=f:\development\cubesDataWorkDirectory=C:\WINNT\TEMPModelWorkDirectory=f:\development\transformer modelsMaxTransactionNum=500000
ReadCacheSize=8192
WriteCacheSize=8192
Temporary UDA directory=C:\DOCUME~1\rustm\LOCALS~1\Temp
12/12/2003 14:53:56 4 00000000 Start cube update.
12/12/2003 14:53:56 4 00000000 Initializing categories.
12/12/2003 14:53:57 4 00000000 Timing, INITIALIZING CATEGORIES,00:00:01
12/12/2003 14:53:57 4 00000000 Start processing data source 'F:\Development\IQD\Prism\PRISM Project Cube.iqd'.
12/12/2003 14:53:57 4 00000000 Reading source data.
12/12/2003 14:53:58 4 00000000 Timing, OPEN DATA SOURCE,00:00:01
12/12/2003 14:53:58 4 00000000 End processing 1398 records from data source 'F:\Development\IQD\Prism\PRISM Project Cube.iqd'.
12/12/2003 14:53:58 4 00000000 Timing, READ DATA SOURCE,00:00:01
12/12/2003 14:53:58 4 00000000 Marking categories used.
12/12/2003 14:53:58 4 00000000 Timing, MARKING CATEGORIES USED,00:00:00
12/12/2003 14:53:58 4 00000000 Updating category status.
12/12/2003 14:53:58 4 00000000 Processing the work file.
12/12/2003 14:53:58 4 00000107 Processing cube 'PRISM Project Cube' at location f:\development\cubes\PRISM Project Cube.mdc
12/12/2003 14:53:59 4 00000000 Timing, UPDATE CATEGORY AND PROCESS WORK FILE,00:00:01
12/12/2003 14:53:59 4 00000107 Start metadata update of cube 'PRISM Project Cube'.
12/12/2003 14:53:59 4 00000000 Marking categories needed.
12/12/2003 14:53:59 4 00000000 Updating the PowerCube metadata.
12/12/2003 14:53:59 4 00000000 Updating the PowerCube with currency data.
12/12/2003 14:54:00 4 00000107 End metadata update of cube 'PRISM Project Cube'. 0 categories were added to the cube.
12/12/2003 14:54:00 4 00000000 Timing, METADATA,00:00:01
12/12/2003 14:54:00 4 00000107 Start update of cube 'PRISM Project Cube'.
12/12/2003 14:54:00 4 00000107 --- Performing Pass 0 with 1398 rows and 6888 categories remaining.
12/12/2003 14:54:00 4 00000107 Start Write leaving 6888 categories remaining.
12/12/2003 14:54:00 4 00000000 Updating the PowerCube data.
12/12/2003 14:54:00 4 00000000 Updating the PowerCube data.
12/12/2003 14:54:00 4 00000000 Performing DataBase Commit at record number 1399.
12/12/2003 14:54:00 4 00000107 End Write leaving 6888 categories remaining..
12/12/2003 14:54:00 4 00000000 Timing, CUBE UPDATE,00:00:00
12/12/2003 14:54:00 4 00000000 Committing PowerCube(s).
12/12/2003 14:54:02 4 00000000 Timing, CUBE COMMIT,00:00:02
12/12/2003 14:54:02 4 00000000 End cube update.
12/12/2003 14:54:02 4 00000000 Timing, TOTAL TIME (CREATE CUBE),00:00:06
PowerPlay Transformer Fri Dec 12 14:54:02 2003
------------------------------------------------------------
But when it is giving the error i cannot find the last line i.e. 'PowerPlay Transformer Fri Dec 12 14:54:02 2003' in the log. The cube is being created for that run. With the same size when it is correct. But when you try to open the cube it is giving the error 'connection string invalid'. The error message that is poping up from the macro is 'Error not handled by the program'. But if you run it try to run the macro manually then it is running fine.
The following macro I have used to build the cube
--------------------------------------------------------
Sub Main ()
Dim objTransApp As Object
Dim objModel As Object
Dim objCube As Object
Dim strModelPath As String
Dim strLocation As String
Dim strModelSource As String
strLocation = "F:\development"
strModelSource = "\Transformer Models\prism\PRISM Project Cube.pyi"
strModelPath = strLocation & strModelSource
Set objTransApp = CreateObject("CognosTransformer.Application"

Set objModel = objTransApp.OpenModel(strModelPath)
' ***** Start Cube build ****
Set objCube = objModel.Cubes.Item(1)
With objCube
.CacheCrossTabs = True
.CompressMDC = False
.Consolidate = 1
.CubeCreation = 2
.MDCFile = "PRISM Project Cube"
.Optimize = 5
.Name = "PRISM Project Cube"
.Update
.CreateMDCFile
End With
objModel.Close
Set objCube = Nothing
Set objModel = Nothing
Set objTransApp = Nothing
End Sub
------------------------------------------------------------
and the batch file contains the following lines to run the macro
------------------------------------------------------------
"%COGNOS_PATH%\runmac32.exe" "%SCRIPT_DIR%\PRISM Project Cube.mac" >> "%LOG_DIR%\cube-build_completed_%YYYYMMDD%.log"
------------------------------------------------------------
Can you please help.
Thanks & Regards
Saikat