How do i know if a cube has build without errors?

Hi,

i have a new customer who has transformer 7.4 and access manager for authentiation.

They build every night around 50 cubes. If a cube fails, the endusers how are running a report based on this cube get an error message. I want to prevent that and reactie PROactive instead of reactive on the failed cube builds.

I know there is a log file for every cube build but i don’t have te time to open all 50 logfiles every morning.

Does anyone know a solution for this, or how do other transformer users this?

thanks

try something like ultraedit. There you can search for words in files within a directory. I believe you can schedule this as well… somehow ;D

hi,

in the past i used this code to scan every transformer log file in the log directory.
Every file is scanned for the words “Warning”, “TR” and "Error"
If one of these words appear in the log file is this written to a new summary logfile.
You only have to open this file every morning to see what the status of all generated cubes are.

Option Explicit

Dim LogFileNo  As Integer
Dim FileNo     As Integer
Dim FileLine   As String

Dim AppPath  As String
Dim iniFile  As String
Dim LogPath  As String

Dim TransformerLogFile  As String
Dim ScriptLogFile       As String
Dim CurrentLogFile      As String
Dim CRLF                As String

' Location of the logfiles to be scanned.
const REPORTDIRECTORYPATH  = "C:\Temp"

Declare Sub Log_Info(Msg_In As String)

' -----------------------------------------------------------------------------------------
Sub Main ()

Dim FileName         As String
Dim ReportDirectory  As String

On Error Goto ErrorTrap

CRLF = Chr$(13) & Chr$(10)
  
  LogPath = "C:\TEMP"
  
  'setup connection to output logfile Cube_Build_Notify_Script.log
  ScriptLogFile = LogPath  & "\LEESMIJ.txt"
  LogFileNo = Freefile()
  Open ScriptLogFile for Output As LogFileNo
  
  Print #LogFileNo, "CUBE_BUILD_NOTIFY Script " & Date() & " " & Time() & CRLF
  Print #LogFileNo, "Transformer Log File: " & ScriptLogFile & CRLF
   
  FileNo = FreeFile()
     
  ReportDirectory = REPORTDIRECTORYPATH & "\*.log"

  'Set directory to scan
  FileName= Dir (ReportDirectory)

Do While FileName<>""  
   CurrentLogFile = REPORTDIRECTORYPATH & "\" & FileName
   Open CurrentLogFile For Input As FileNo ' open Transformer log file        
     Print #LogFileNo, "<<< " & CurrentLogFile & " gestart... >>>"     
     Do While Not Eof(FileNo)              
     
        Line Input #FileNo, FileLine       ' read each line in log file
                     
        If InStr(1, FileLine, "Error:", 1) > 0 Then       
           call Log_Info(FileLine)
        End If  
                                       
        If InStr(1, FileLine, "Warning:", 1) > 0 Then       
           call Log_Info(FileLine)
        End If 
                        
        If InStr(1, FileLine, "(TR", 1) > 0 Then       
           call Log_Info(FileLine)
        End If   
     Loop  
     
     Print #LogFileNo, "<<< " & CurrentLogFile & " afgerond >>>"
     Close FileNo ' close Transformer log file
        
   FileName=Dir
Loop
     
     call Log_Info("End CUBE_BUILD_NOTIFY Script ")   
     Exit Sub
         
errorTrap:
   Call Log_Info("Error " & Str(Err) & ": " & Error$(Err))
   Close #LogFileNo
         
End Sub 'main

'--------------------------------------------------------------------------------------------
Sub Log_Info(Msg_In as String)

  Print #LogFileNo, Date() & "-" & Time() & ": " & Msg_In
  
End Sub

'--------------------------------------------------------------------------------------------

just copy this code to cognosscript and save it.
Change the const REPORTDIRECTORYPATH value to the directory where your transformer logfiles are stored.

good luck