Page 1 of 1

Record Delimiter

Posted: Wed Sep 17, 2008 8:30 am
by jherr22
How do I use hex 1e as the record delimiter reading a sequential file? I assume I use the final delimiter string, but how do I tell it to use a hex character?

Posted: Wed Sep 17, 2008 10:44 pm
by mahadev.v
Not sure how to specify a hex character as a delimiter in the sequential file stage. But probably you can change the character to a coma or any other character using unix command in external source stage. See if this post helps.

viewtopic.php?t=113640

Posted: Wed Sep 17, 2008 11:11 pm
by ray.wurlod
Do you mean, by "record delimiter":
  • (a) the character that marks the end of the record (the record delimiter)?

    (b) a character that appears between the final field and the record delimiter (the final delimiter)?

    (c) the character that separates fields within the record (the field delimiter)?

Posted: Thu Sep 25, 2008 8:14 am
by jherr22
By "record delimiter", I mean

(a) the character that marks the end of the record (the record delimiter)?

Posted: Thu Sep 25, 2008 8:33 am
by ArndW
The record delimiter field in the sequential file window only allows the input of the 2 default values, nothing or 1-character so in this particular instance you cannot use the 0x1E type of representation. This should be noted as a bug, in my opinion.
Wasn't there a Windows keyboard shortcut to create characters from their ASCII numeric value? Perhaps a cut-and-paste might work there as well. If not, there are still several alternatives - I would opt for using the UNIX "tr" preprocessing command to convert 0x1E in the source to a real LF (assuming LF does not occur in the file in other places).

Posted: Thu Sep 25, 2008 2:13 pm
by jherr22
That is exactly the problem - the text I am capturing does have a LF that I need to preserve. We are getting the source file from another entity with the hex 1e as the record delimiter. We are using the pipe as a field terminator - could we also use a pipe for the record delimiter as well?

Posted: Thu Sep 25, 2008 2:57 pm
by ray.wurlod
If you have this character AND a linefeed, then this character is the "final delimiter" and the linefeed is the record delimter ("UNIX style").