Special character !! ... ascii value "20" ?
Moderators: chulett, rschirm, roy
Special character !! ... ascii value "20" ?
HI,
I am creating a fixed width file as a final target to my job. DS fills the empty space with blank values which are not spaces. This file when we try to load to SAP those blanks show as ###.
I have tried viewing the file in HEX EDITOR and found that "20" is filling in the spaces( THE VALUE IN RED BELOW). How can I prevent this.
DEC HEX CHARACTER DEC HEX CHARACTER
------------------------------------------------
0 00 ctl@ NUL | 64 40 @
1 01 ctlA SOH | 65 41 A
2 02 ctlB STX | 66 42 B
3 03 ctlC ETX | 67 43 C
4 04 ctlD EOT | 68 44 D
5 05 ctlE ENQ | 69 45 E
6 06 ctlF ACK | 70 46 F
7 07 ctlG BELL | 71 47 G
8 08 ctlH BS | 72 48 H
9 09 ctlI HT | 73 49 I
10 0A ctlJ LF | 74 4A J
11 0B ctlK VT | 75 4B K
12 0C ctlL FF | 76 4C L
13 0D ctlM CR | 77 4D M
14 0E ctlN SO | 78 4E N
15 0F ctlO SI | 79 4F O
16 10 ctlP DLE | 80 50 P
17 11 ctlQ DC1 | 81 51 Q
18 12 ctlR DC2 | 82 52 R
19 13 ctlS DC3 | 83 53 S
20 14 ctlT DC4 | 84 54 T
21 15 ctlU NAK | 85 55 U
22 16 ctlV SYN | 86 56 V
23 17 ctlW ETB | 87 57 W
24 18 ctlX CAN | 88 58 X
I am using APT_STRING_PADCHAR , but it dosent seem to work ...
Please help
I am creating a fixed width file as a final target to my job. DS fills the empty space with blank values which are not spaces. This file when we try to load to SAP those blanks show as ###.
I have tried viewing the file in HEX EDITOR and found that "20" is filling in the spaces( THE VALUE IN RED BELOW). How can I prevent this.
DEC HEX CHARACTER DEC HEX CHARACTER
------------------------------------------------
0 00 ctl@ NUL | 64 40 @
1 01 ctlA SOH | 65 41 A
2 02 ctlB STX | 66 42 B
3 03 ctlC ETX | 67 43 C
4 04 ctlD EOT | 68 44 D
5 05 ctlE ENQ | 69 45 E
6 06 ctlF ACK | 70 46 F
7 07 ctlG BELL | 71 47 G
8 08 ctlH BS | 72 48 H
9 09 ctlI HT | 73 49 I
10 0A ctlJ LF | 74 4A J
11 0B ctlK VT | 75 4B K
12 0C ctlL FF | 76 4C L
13 0D ctlM CR | 77 4D M
14 0E ctlN SO | 78 4E N
15 0F ctlO SI | 79 4F O
16 10 ctlP DLE | 80 50 P
17 11 ctlQ DC1 | 81 51 Q
18 12 ctlR DC2 | 82 52 R
19 13 ctlS DC3 | 83 53 S
20 14 ctlT DC4 | 84 54 T
21 15 ctlU NAK | 85 55 U
22 16 ctlV SYN | 86 56 V
23 17 ctlW ETB | 87 57 W
24 18 ctlX CAN | 88 58 X
I am using APT_STRING_PADCHAR , but it dosent seem to work ...
Please help
Last edited by ady on Fri Mar 23, 2007 2:53 pm, edited 2 times in total.
0506110000 0000905413TN200605120620000000 0000905413TN200605140356380000
0000905413TN200605150568250000 0000905413TN200605210306880000 0000915113
ZP200608130546660000 0000915113ZP200608140291640000 0000915113ZP2006081806
04450000 0000915113ZP200608210647340000 0000905413TN200605120241960000
0000905413TN200605140136140000 0000905413TN200605150607890000 0000905413TN
200605210322420000 0000905413TN200605120291000000 0000905413TN200605150245
820000 0000905413TN200605160585850000 0000905413TN200605250550390000 00
00915213ZQ200608140487070000 0000915213ZQ200608140217140000 0000915313ZR2006
08110620000000 0000915313ZR200608110306560000 0000905413TN2006051201325200
00 0000905413TN200605150439370000 0000905413TN200605160447390000 000090
5413TN200605110199660000 0000905413TN200605120217620000 0000905413TN200605
That is how the data looks , but those blank spaces are filled by that character
0000905413TN200605150568250000 0000905413TN200605210306880000 0000915113
ZP200608130546660000 0000915113ZP200608140291640000 0000915113ZP2006081806
04450000 0000915113ZP200608210647340000 0000905413TN200605120241960000
0000905413TN200605140136140000 0000905413TN200605150607890000 0000905413TN
200605210322420000 0000905413TN200605120291000000 0000905413TN200605150245
820000 0000905413TN200605160585850000 0000905413TN200605250550390000 00
00915213ZQ200608140487070000 0000915213ZQ200608140217140000 0000915313ZR2006
08110620000000 0000915313ZR200608110306560000 0000905413TN2006051201325200
00 0000905413TN200605150439370000 0000905413TN200605160447390000 000090
5413TN200605110199660000 0000905413TN200605120217620000 0000905413TN200605
That is how the data looks , but those blank spaces are filled by that character
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The hashes might be being put in by DataStage, if that's the pad character setting. If the table definitions were imported from sequential files, that is a significant possibility.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Thanks for the replies guys ... sorry i'm late to catch up,
The "space characters" which are padding the data show up as "#" in SAP BW environment.
20 14 ctlT DC4 | 84 54 T is the value padding the data, Its a space but shows up as "#" in SAP. When i try to view the file with the command
od -tc $Filename
The padding spaces show up as null values , here's a sample of how the data looks:
[/color]
If the character padding the data is a space the data should be like :
Hope I am more clear this time
The "space characters" which are padding the data show up as "#" in SAP BW environment.
20 14 ctlT DC4 | 84 54 T is the value padding the data, Its a space but shows up as "#" in SAP. When i try to view the file with the command
od -tc $Filename
The padding spaces show up as null values , here's a sample of how the data looks:
Code: Select all
\n " 2 0 0 6 1 2 1 8 " " 0 2 5 7
7 0 \0 \0 \0 \0 " " 0 2 5 7 7 0 \0 \0
\0 \0 " " C 0 3 0 5 6 0 0 0 0 0
\0 \0 \0 \0 \0 " " \0 " " 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "
" 5 9 7 " " \0 " " 0 0 9 3 0
3 2 0 0 4 " " 2 0 0 7 0 3 2 6 "
" 1 1 1 7 2 3 " " 0 0 0 0 5 8 0
3 " " 0 0 0 0 9 2 7 8 " " 1 4 M
Y \0 \0 \0 \0 " " 2 0 3 9 9 " "
" " " " \0 \0 \0 "
" " \n " 2 0 0 6 1 2 1 8 " " 0
2 3 2 3 8 \0 \0 \0 \0 " " 0 2 3 2 3
8 \0 \0 \0 \0 " " C 0 3 0 5 6 0 0 0
0 0 \0 \0 \0 \0 \0 " " \0 "
If the character padding the data is a space the data should be like :
Code: Select all
[color=blue]0 0 0 0 0 . " , " C 0 3 0 5 6 0
0 0 0 0 " , " 2 0 3 9 9 " ,
" 5 9 7 " \n " 0 0 0 0 5 8
0 3 . " , " 0 0 0 0 9 2 7 8 .
" , " 1 4 M Y " , " 0 2 7 0 3 8
" , " 0 0 9 3 0 3 1 5 1 3 " , "
2 0 0 6 - 1 2 - 1 8 " , " 5 1 2
8 0 " , " "
, " " , " " , " " ,
" 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 . " , " C 0 3 0
5 6 0 0 0 0 0 " , " 2 0 3 9
9 " , " 5 9 7 " \n " 0 0 0
0 5 8 0 3 . " , " 0 0 0 0 9 2[/color]
The job design is like this:
SEQUENTIAL FILE - BASIC TRANSFORMER - SEQUENTIAL FILE
I am Trimming, changing the datatypes from varchar to char, and forcing 2 decimal(20) values to char(17) using Right(Trim(IN.COL,".","A"),17)
Thats it ... there nothing more to the job. you can see the data posted above as viewed from od -tc, the clean data is the input and the one with nulls is the output for this job.
Please let me know if I am doin anything wrong. Thanks
SEQUENTIAL FILE - BASIC TRANSFORMER - SEQUENTIAL FILE
I am Trimming, changing the datatypes from varchar to char, and forcing 2 decimal(20) values to char(17) using Right(Trim(IN.COL,".","A"),17)
Thats it ... there nothing more to the job. you can see the data posted above as viewed from od -tc, the clean data is the input and the one with nulls is the output for this job.
Please let me know if I am doin anything wrong. Thanks
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: