Hi ALL,
I/p
col1,col2,col3
2,b,100
6,f,200
1,a,10
5,e,300
3,c,30
4,d,20
col1- integer
col2-varchar
col3-integer
o/p
col1,col2,col3
col1,col2,col3
2,bzzzz,100
6,fzzzz,200
1,azzzz,10
5,ezzzz,300
3,czzzz,30
4,dzzzz,20
In transfomer I changed the Data type from varchar to char(5) for col2
and APT_STRING_PADCHAR is assigned to z
But I am getting following output
col1,col2,col3
2,b,100
6,f,200
1,a,10
5,e,300
3,c,30
4,d,20
APT_STRING_PADCHAR
Moderators: chulett, rschirm, roy
Hi
1st understand about APT_STRING_PADCHAR.
Datastage CHAR fields are always padded to their full size and the environment variable that controls that is APT_STRING_PADCHAR.
By default it is set to '0x00' (hex zeroes or low-values) which is what you are currently seeing.
Add $APT_STRING_PADCHAR to your job and change it to '0x20' if you need to have them padded with spaces (a hex 20 is a space).
Or use whatever other value you'd prefer.
Thanks
Man
1st understand about APT_STRING_PADCHAR.
Datastage CHAR fields are always padded to their full size and the environment variable that controls that is APT_STRING_PADCHAR.
By default it is set to '0x00' (hex zeroes or low-values) which is what you are currently seeing.
Add $APT_STRING_PADCHAR to your job and change it to '0x20' if you need to have them padded with spaces (a hex 20 is a space).
Or use whatever other value you'd prefer.
Thanks
Man
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Thanks alot for your inputs
I am getting required output after changing the value from z to 0x7A for the variable APT_STRING_PADCHAR.But I have small clarification.Could any body please clarify below doubt
1)Do we need to use Hexadecimal notation while assigning the value for APT_STRING_PADCHAR variable everytime.Can not we assign z or 'z' directly to APT_STRING_PADCHAR?
I am getting required output after changing the value from z to 0x7A for the variable APT_STRING_PADCHAR.But I have small clarification.Could any body please clarify below doubt
1)Do we need to use Hexadecimal notation while assigning the value for APT_STRING_PADCHAR variable everytime.Can not we assign z or 'z' directly to APT_STRING_PADCHAR?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: