Record Delimiter

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
jherr22
Premium Member
Premium Member
Posts: 56
Joined: Mon Jan 29, 2007 3:24 pm
Location: Denver
Contact:

Record Delimiter

Post 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?
mahadev.v
Participant
Posts: 111
Joined: Tue May 06, 2008 5:29 am
Location: Bangalore

Post 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
"given enough eyeballs, all bugs are shallow" - Eric S. Raymond
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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)?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jherr22
Premium Member
Premium Member
Posts: 56
Joined: Mon Jan 29, 2007 3:24 pm
Location: Denver
Contact:

Post by jherr22 »

By "record delimiter", I mean

(a) the character that marks the end of the record (the record delimiter)?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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).
jherr22
Premium Member
Premium Member
Posts: 56
Joined: Mon Jan 29, 2007 3:24 pm
Location: Denver
Contact:

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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").
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply