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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COGNOS Cube generation problem through macro

Status
Not open for further replies.

saikat123

MIS
Dec 30, 2003
11
US
Hi

I have created some pyi models and generating the cubes automatically using macros. I have batch file which is calling those macros. If I run the batch files in my m/c it is working fine. When it is running from the production server giving some errors. The erros are not restricted to any particular cubes. But some of the cubes giving 'Connection string invalid' message when trying to open it and the rest of the process being hanged.

Could anybody tell me what is the cause of the problem.
 
saikat
Sounds like the model is not working properly - have you checked that the paths of the data sources and the cube(s) are defined correctly for access by the server? That is to say, is it a network drive that has not been mapped on the server? Otherwise, is the server failing to access a data source properly (ODBC problem)?
What does the log file show? Where does it differ from the log file produced on your PC?
lex
 
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
 
Saikat,
With inconsistent success, the problem often lies with the data access; are there any issues with data availability? Does the script work ok at certain times and dates only. Does the log file show less or no records being read?
I've only had similar problems when the database is being used by another process to the exclusion of others or the server on which it is running has been taxed by another process.
Sorry not to be more helpful,
happy new year,
lex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top