Removing junk character from a field in modify stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Sagnik Mukherjee
Participant
Posts: 14
Joined: Wed Jul 25, 2012 5:29 am
Location: Mumbai

Removing junk character from a field in modify stage

Post by Sagnik Mukherjee »

Hi,
I got junk characters(like small small boxes) in one field. I am using modify stage and in this stage I handled null for that field.
Ex - AMEX_REV_CMNT_TX:string[max=100] = handle_null(AMEX_REV_CMNT_TX,"")
where AMEX_REV_CMNT_TX is the field name.
But still the issue is not resolved.

I assume that the junk characters are ascii characters.
Now can we remove ascii characters from a field?? Is there any syntax??
Or anyone have any other solution removing the junk characters from modify stage??

Thanks..
Sagnik
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Those "junk" characters are indeed non-displayable characters in your current language set / representation. Are you certain that you really wish to remove these characters from the text/comment fields; perhaps the data will later be read by someone who does have the correct NLS settings and who might wish to read those words.

If you still need to remove these characters then using a transform stage might be necessary, as I cannot offhand think of a modify stage function that will do this for you.

Essentially you will need to replace all characters with ASCII values below your lowest valid visible character as well as those with ASCII values above your highest valid visible character (using single-byte LATIN-1 representation).
Post Reply