cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting Null character in Source File

Former Member
0 Kudos

Hi all,

My source file looks like this

#{#-###

#M#I#D#B#G#B#D#D#0#0#3###

#M#I#D#B#G#B#D#D#0#0#3###

#1#0#1###

#:#2#0#:#X#1#0#1#2#4#9#0#7#0#0#5#5#0#1#0###

#:#2#1#R#:#0#0#0#0#0#5#5#1#1#1###

#:#2#8#D#:#1###

#/#1###

#:#5#2#A#:#M#I#D#B#G#B#D#D#0#0#3###

#:#3#0#:#0#7#0#6#0#1###

#:#2#5#:#E#B#P#7#2#6#2###

###

#:#2#1#:#2#0#0#0#0#0#0#0#0#7# #0#6#0#1###

#:#2#3#E#:#U#R#G#P###

#:#3#2#B#:#G#B#P#2#5#0#0#0#,#0#0###

#:#5#0#H#:#/#1#2#7#6#6#5###

#A#D#R#E#S#S# #1# #C#O#M#P#A#N#Y# #C#O#D#E###

#A#D#R#E#S#S# #2# #C#O#M#P#A#N#Y# #C#O#D#E###

#A#D#R#E#S#S# #3# #C#O#M#P#A#N#Y# #C#O#D#E###

#A#D#R#E#S#S# #4# #C#O#M#P#A#N#Y# #C#O#D#E###

#:#5#7#A#:#N#W#B#K#G#B#2#1#1#8#R###

#:#5#9#:#/#1#2#3#4#5#6#7#8###

#E#X#T#E#R#N#A#L# #V#E#N#D#O#R###

#R#U#E# #D#E# #T#H#E#U#X#,# #4#2###

#1#0#4#0# #B#R#U#S#S#E#L# #B#E#L#G#I#U#M###

#:#7#0#:#I#N#V#.# #1#9#0#0#0#0#0#0#0#2# #F#R#.#0#1#.#0#5#.#0#7#

#:#7#1#A#:#S#H#A###

#-#}###

This file is generated by SAP Standared program and it will be uploaded in FTP through Unix directories.

  1. is actually null charcter but it is showing as # in FTP.

I want to send this file to target by removing #.

Please suggest.

Edited by: Dinesh on Mar 13, 2008 8:28 PM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Most data files should use binary mode ftp. On file transfers it is more efficient to use binary mode even if the file is an ASCII file. This is particulary useful when transferring large files. As in your case if ASCII file contain null characters, it should be transffered in binary mode ftp. This will ensure null characters are not dropped.

Let me know if this works for you.

Former Member
0 Kudos

Dinesh,

One option is read this file into XI. Make sure you read the whole line as one record into XI. Then use the standard function replace string. For this pass your input record as first argument then for 2nd input you put constant # and for third input just put a constant without any value. With this you can remove your symbol # from the file.

Another option is you can even write a unix program which removes # and does the FTP. But this option is at Operating System level but not with XI.

Regards,

---Satish

Former Member
0 Kudos

Hi Satish

Can you elobrate how to do it please.

if possible can i have ur contact number .

Edited by: Dinesh on Mar 13, 2008 9:12 PM

Former Member
0 Kudos

Dinesh,

First of all please check the suggestion given by kumari. If that didnot solve then you can follow my suggestion. My intution is some problems while reading the file only. Just try to copy the whole file in a different system and see. If that doesnot also solve then follow this:

First you read the whole file into XI as one record for each line. Just create a datatype with two fields Record and within it a Row. So use content conversion So in XI you have one line as one record. Then you use the standard function.

http://www.UploadYourImages.com/view/491109mapping.jpg

http://www.UploadYourImages.com/view/840694testing.jpg

http://www.UploadYourImages.com/view/215524configuration.jpg

Regards,

---Satish

Former Member
0 Kudos

Hi Satish,

Thanks for your time and work,

Solution given by Kumari will not work in my case as i have already tried that why.

I can see very positive way from your solution and tried as you mentioned.

Still iam getting some mapping error ,i guess.

It would be very helpfull if you reply my Mail which i have mailed to ur Gmail ID.

Regards

Dinesh

0 Kudos

Hi Dinesh,

can you please share the fix for this issue ?

I am having the exact same issue for 2 of my output files.

Right now, i have to manually delete the null values from the file using tr commands but that is not something i can continue to do.

Thanks,

Former Member
0 Kudos

Hi

I think its the way you are creating the file and placing on the server thats creating these characters.

Please place the file on the folder in binary mode and read it in binary mode and this error might go

Regards

Vijaya