|
@@ -0,0 +1,62 @@
|
|
|
+Dim objApp As Object
|
|
|
+Dim objModel As Object
|
|
|
+Dim objDataSource As Object
|
|
|
+Dim objQuery As Object
|
|
|
+Dim objCube As Object
|
|
|
+
|
|
|
+Dim filename as String
|
|
|
+Dim folder as String
|
|
|
+Dim logfile As String
|
|
|
+
|
|
|
+
|
|
|
+Sub Main ()
|
|
|
+ On Error Resume Next
|
|
|
+
|
|
|
+ folder = "C:\GlobalCube\System\AUDEV_CARIT\Models"
|
|
|
+ filename = "s_offene_auftraege.pyj"
|
|
|
+ rem filename = "f_belege.pyj"
|
|
|
+ rem publish = "C:\GAPS\Portal\System\Cube_out\temp"
|
|
|
+
|
|
|
+ folder = GetField(Command, 1, ",")
|
|
|
+ filename = GetField(Command, 2, ",")
|
|
|
+ logfile = GetField(Command, 3, ",")
|
|
|
+
|
|
|
+ Set objApp = CreateObject("IBMCognosTransformer.ApplicationCtrl.1")
|
|
|
+ Set objModel = objApp.OpenModel(folder + "\" + filename)
|
|
|
+
|
|
|
+ Open logfile for Output as #1
|
|
|
+ rem Print objModel.DataSources.Count
|
|
|
+ For i = 1 to objModel.DataSources.Count
|
|
|
+ Set objDataSource = objModel.DataSources.Item(i)
|
|
|
+
|
|
|
+ If objDataSource.Type = 38 Then
|
|
|
+ rem Package
|
|
|
+ For j = 1 to objDataSource.Queries.Count
|
|
|
+ Set objQuery = objDataSource.Queries.Item(j)
|
|
|
+ Write #1, objQuery.Name
|
|
|
+ Next
|
|
|
+ Exit For
|
|
|
+ End If
|
|
|
+ If objDataSource.Type = 6 Then
|
|
|
+ Write #1, objDataSource.LocalPath
|
|
|
+ Else
|
|
|
+ Write #1, objDataSource.Name
|
|
|
+ End If
|
|
|
+
|
|
|
+ rem If objDataSource.Type = 4 Then
|
|
|
+ rem Print objDataSource.SQLExpression
|
|
|
+ rem End If
|
|
|
+ rem Print "--"
|
|
|
+ Next
|
|
|
+ Write #1, "--"
|
|
|
+ Set objCube = objModel.Cubes.Item(1)
|
|
|
+ Write #1, objCube.MDCFile
|
|
|
+ Close #1
|
|
|
+
|
|
|
+ objModel.Close
|
|
|
+ rem objApp.Quit
|
|
|
+ Set objQuery = Nothing
|
|
|
+ Set objDataSource = Nothing
|
|
|
+ Set objModel = Nothing
|
|
|
+ Set objApp = Nothing
|
|
|
+End Sub
|