on 09-01-2008 2:57 PM
I have one String "S" size 0 to 200 in Source.
I need to map S to 3 fields in Target. I used substring ,When the size become less than 200 ,it is giving Outofbounds Exception.
-
S1(0,60)
S(0,200) -
S2(0,60)
-
S3(0,60)
Can anyone help me on this?
Which is better eithr GUI Mapping or Java Mapping?
helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
before mapping the source field to target structure first you can check wheather that string has length less than the specified length that you want by writing UDF and then map it to target field.
Edited by: murali krishna on Sep 1, 2008 5:56 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
you can do padding with some null characters before giving the string to substring function.That means if the length of the string is 200, but if only 150 characters are coming from source field then fill the remining 50 chracters with null values by using UDF,then you can give the new padded string to the substring function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you get a OutOfBoundexception because the string does not have the length that you expect in your substring statements.
Regards Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.