Hello,
I'm trying to use the "writetofile("")" subroutine in order to see what the system does during translation.
I was asked by Oracle support to place the subroutine before and after the translation rule as follows:
Sub calculate()
Call WriteToFile("Translation:" & Hs.scenario.Member & " " & Hs.year.Member & " " & Hs.entity.Member)
End sub
Sub WriteToFile(txtStringToWrite)
On Error Resume Next
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("C:\RuleTestDIR\RulesLog.txt", ForAppending, True)
f.WriteLine txtStringToWrite & " " & Now()
f.Close
On Error GoTo 0
End Sub
Sub Translate()
hs.trans "A#22208000","A#22208000","A#AVR",""
hs.transperiodic "A#22209000","A#PL","A#EOP","A#AVR"
End sub
Sub WriteToFile(txtStringToWrite)
On Error Resume Next
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("C:\RuleTestDIR\RulesLog.txt", ForAppending, True)
f.WriteLine txtStringToWrite & " " & Now()
f.Close
On Error GoTo 0
End Sub
BUT I'm not sure what I should enter within the parenthesis (in red) Call WriteToFile("Translation:" & Hs.scenario.Member & " " & Hs.year.Member & " " & Hs.entity.Member) in order to see the rates the system is using and the actual result of the translation.
Please assist.
Thanks
Laila