User Tools

Site Tools


separatista_com_control


This is an old revision of the document!


Separatista COM Control

Examples

MT940SDocument
SeparatistaControl.vbs
Set doc = CreateObject("Separatista.MT940SDocument")
 
If doc.Open("C:\Users\Okkel\Downloads\MT940.swi") = 0 Then
	WScript.Echo "Number of documents:" & doc.RecordsetCount
 
	For Each rs In doc
		WScript.Echo "*************************** New Recordset"
		WScript.Echo "CurrencyClient: " & rs.CurrencyClient
		WScript.Echo "Transaction reference: " & rs.TransactionReference
		WScript.Echo "Serial Number: " & rs.SerialNumber
		WScript.Echo "Client IBAN: " & rs.IBANClient.IBAN
		WScript.Echo "Previous Balance: " & FormatCurrency(rs.PreviousBalance)
		WScript.Echo "Previous Balance Date:  " & FormatDateTime(rs.PreviousBalanceDate, 1)
		WScript.Echo "Current Balance: " & FormatCurrency(rs.CurrentBalance)
		WScript.Echo "Current Balance Date:  " & FormatDateTime(rs.CurrentBalanceDate, 1)
		rs.MoveFirst
 
		do while not rs.EOF 
			WScript.Echo Chr(9) & "********************************** New Transaction"
			WScript.Echo Chr(9) & "Transaction Date: " & FormatDateTime(rs.TransactionDate, 1)
			WScript.Echo Chr(9) & "RDC Code: " & rs.RDCCode
			WScript.Echo Chr(9) & "Currency: " & FormatCurrency(rs.Currency)
			WScript.Echo Chr(9) & "Transaction code: " & rs.TransactionCode
			WScript.Echo Chr(9) & "Transaction reference:  " & rs.TransactionRef
			WScript.Echo Chr(9) & "Foreign IBAN: " & rs.ForeignIBAN.IBAN
 
			for each key in rs
				WScript.Echo Chr(9) & Chr(9) & "********************************** New Description"
				WScript.Echo Chr(9) & Chr(9) & key & "=>" & rs.Description(key)
			next
 
			rs.MoveNext
		loop
		WScript.Echo ""
    Next
Else
    WScript.Echo "Parser error"
End If
 
if Err.Number <> 0 then
	WScript.Echo Err.Description
End if
 
Do While Not WScript.StdIn.AtEndOfLine
   Input = WScript.StdIn.Read(1)
Loop
WScript.Echo "The script is complete." 
separatista_com_control.1424463331.txt.gz · Last modified: 2015/02/20 21:15 by okkel