43
The
fParseString
function is not a Visual Basic function but a FDM function used to parse
strings that contain a delimiter. In he file shown in the following example, the first field is
separated by dashes (“-“). By using fParseString, this field can be separated into three distinct
fields by specifying the dash as the delimiter. Use
fParseString
to retrieve the entity and
description fields.
The entity in the source file is the set of digits before the first hyphen in the first field.
--------------------------------------------------------------------
Function NY_ParseCenter [strField, strRecord]
‘------------------------------------------------------------------
‘ FDM DataPump Import Script:
‘Created by: FDM_Admin
‘Date created: 2/28/2006
‘------------------------------------------------------------------
NY_ParseCenter = DW.Utilities.fParseString (strField, 3, 1, “-”)
End Function
--------------------------------------------------------------------
NY_ParseCenter
returns the entity (first set of numbers before the first hyphen in the first field
of the data file).
The description is the last set of characters in the first field of the source file row (after the second
hyphen).
Function NY_ParseDesc [strField, strRecord]
‘------------------------------------------------------------------
‘ FDM DataPump Import Script:
‘Created by: FDM_Admin
‘Date created: 2/28/2006
‘------------------------------------------------------------------
NY_ParseDesc = DW.Utilities.fParseString (strField, 3, 3, “-”)
End Function
NY_ParseDesc
returns the description (the set of characters after the second hyphen in the first
field of the data file).
The scripts are assigned to the Entity and Description fields.
180
Scr
i
pt
i
ng