Parse structured rule truncates spaces
Parse structured rule truncates spaces.
Steps to Reproduce
Use Parse-Char-Pos as part of a structured parse rule.
An issue in the custom application code or rules
Parse-Char-Pos is working as expected.
The Parse-Char-Pos method takes two arguments offset and length.
Spaces are preserved, though in the simulator and clipboard dis[play it may appear otherwise.
Specify an offsett of 0 to continue from where the last property was parsed (or the begining of the line) and a length for the specific length, in characters, for the size of the next fixed lenghth item.
If using Parse-Char_Pos to parse a line at a time in a file, then the end of line character or characters must be parsed like any other character in the input stream. This will vary by platform and be either a one or two chacaters for UNIX or Windows.
Here is a screen shot of a Structured Parse Rule that parses a fixed lengthed input record from a file as part of a file listener.
The log message in this example emits the value in the file and the length - confirming that the data is both read and that spaces are preserved.
The output in the log file is this:
ColumnLength5=12345 length is 5
ColumnLength10=1234567890 length is 10
ColumnLength15=123456789012345 length is 15
ColumnLength5=A length is 5
ColumnLength10=B length is 10
ColumnLength15=C E length is 15
ColumnLength5=X length is 5
ColumnLength10=Y length is 10
ColumnLength15=Z length is 15