Urgent *In Sequential file ^@ junk characters are coming**

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
dsscholar
Premium Member
Premium Member
Posts: 195
Joined: Thu Oct 19, 2006 2:45 pm

Urgent *In Sequential file ^@ junk characters are coming**

Post by dsscholar »

Hi All,
In My source sequentail file i am getting ^@ characters afters column value and also in between.so i have tried through convert function convert(convert(lnk_non_cardinal_invoice_line.DEPT_NUM,CHAR(10),' '),CHAR(13),' ') but again lookup failed and reject file contains the same characters also it is a single character in unix so mgt be the ascii value is wrong also i have tried through somore ascii values alos like chr(64),chr(94)... but again not worked can anyone plz help me out to resolve thiss issue.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

1. It's not urgent for us.

2. Please explain why this question falls under the heading "data quality best practices" or post it in the correct forum.

3. ^@ (or Ctrl-@) characters are not junk. These are ASCII NUL characters, presumably padding Char fields based on the string pad character environment variable.

Search DSXchange for more information.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
manoj_23sakthi
Participant
Posts: 47
Joined: Tue Feb 23, 2010 12:16 am
Location: CHENNAI

Post by manoj_23sakthi »

HI,
Use trim A function with below junk character it will remove all occurances

Thanks & regards,
manoj kumar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Off we go to where I think this belongs based on your posting history.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

This is the one liner you require in Filter option in sequential file stage:

Code: Select all

echo  hi^@ghgh@^|sed -e 's/\^//g' -e 's/\@//g'
highgh
pandeeswaran
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

How you are doing in Convert()?

Code: Select all

Convert('^@','',inputcolumn)
works good for me,
Last edited by pandeesh on Tue Jan 03, 2012 8:00 am, edited 1 time in total.
pandeeswaran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, it's not. Re-read Ray's post, specifically point #3. Those are representations of a single character, not a "^" character followed by an "@".
-craig

"You can never have too many knives" -- Logan Nine Fingers
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post by zulfi123786 »

pandeesh wrote:

Code: Select all

echo  hi^@ghgh@^|sed -e 's/\^//g' -e 's/\@//g'
highgh
The ^@ character what the user dsscholar speaks about is not a combination of '^' followed by '@' characters. Its actually a single nonprintable character which appears to be '^@' so the sed code wouldn't work
- Zulfi
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post by zulfi123786 »

Oops Craig for the second time reached while i was typing :wink:
- Zulfi
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

If so

Code: Select all

Sed 's/\0//g'
will work then !!
pandeeswaran
Post Reply