WilEbron Contributor.
Contributor.
127 views

Connect-IT Runtime Error for Text File Processing

Does anyone have any suggestions for fixing this runtime error in Connect-IT?  The version being used is 9.80. The data source field has to be parsed and I'm using the following script in the field for Integer. The issue is those without GB or TB included.

Dim strStorVal1,strStorVal2, strGB, strTB As String
Dim strValue As String
Dim iValue, iGBValue, iTBValue As Integer
strGB = RightPart([VM_Storage], ".","", 0)
strTB = Right([VM_Storage], 2)
strValue = Trim([VM_Storage])

strStorVal1 = Replace(Replace([VM_Storage], "GB","", 0), "TB","", 0)
strStorVal2 = Replace(Replace([VM_Storage], "GB","", 0), "TB","", 0) * 1000
If [VM_Storage] = "0.0bytes" OR [VM_Storage]= "SPLUNK_NULL" OR [VM_Storage]= "N_SPLUNK_NULL" OR [VM_Storage]= "" Then
PifIgnoreNodeMapping
ElseIf strGB = "0GB" Then
RetVal = strStorVal1
ElseIf strTB = "TB" Then
RetVal = strStorVal2
Else
RetVal = strValue
End If

 

0 Likes
2 Replies
Highlighted
Acclaimed Contributor.. Mark Cullen_1 Acclaimed Contributor..
Acclaimed Contributor..

Re: Connect-IT Runtime Error for Text File Processing

"...The issue is those without GB or TB included." - Seems like you need to use pifIgnoreDocumentMapping() for these so they are not processed.

0 Likes
WilEbron Contributor.
Contributor.

Re: Connect-IT Runtime Error for Text File Processing

The data source is not consistent, which is the real problem.  However, I need to process those lines without GB or TB as well.  I've tried using CInt but that doesn't seem to work either.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.