You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a flatfile that uses fixed width columns, has 0x00 (hex null) separators but from what I can see, that also have null padding that I am trying to query.
Because the incoming flatfile doesn't have column headers, this looks like it would be a great tool to work with, but wasn't sure if it was possible to use a hex separator?
It looks like strings are padded with spaces, and integer values with null. I started writing some logic to play with trying to convert it to CSV, but I will have to do some magic with datatypes that you have already accomplished since I have byte groups that are the dates and integers stored in little endian.
for (int i = 0; i < block.Length; i++) //one fixed width line from flatfile
{
if (i == block.Length)
{
line += "\n"; // this is the end of the line
}
if (i > 1 && i< block.Length)
{
// deal with null padding and create csv
if (block[i] == 0x00 && block[i]+1 != 0x00)
{
line += "','";
}else if (block[i] == 0x00 && block[i]-1 != 0x00)
{
line += "','";
}
}
if (block[i]!=0x00)
{
line += (char)block[i]; // it isn't null, so display it
}
}
The text was updated successfully, but these errors were encountered:
I have a flatfile that uses fixed width columns, has 0x00 (hex null) separators but from what I can see, that also have null padding that I am trying to query.
Because the incoming flatfile doesn't have column headers, this looks like it would be a great tool to work with, but wasn't sure if it was possible to use a hex separator?
Here is an example of the data where � = null:
It looks like strings are padded with spaces, and integer values with null. I started writing some logic to play with trying to convert it to CSV, but I will have to do some magic with datatypes that you have already accomplished since I have byte groups that are the dates and integers stored in little endian.
The text was updated successfully, but these errors were encountered: