2006 Apr 06 2:54 PM
hi,
I have following problem. I have a table with fields:
...
LINE_LEN type INDX_CLSTR (INT2)
LINE type LRAW length 1024
Now in this table a document (jpg) is saved. The length of the LINE is saved in LINE_LEN for each LINE.
Now the last line of the jpg in the table has a length of 288. How can I get the length,
because if I read the line I get always a length of 1024 (describe field...). I think the reason for this is, that
the line is saved with trailing '00000000000000000000000000000000000'.
How can I get the correct length?
Thanks
markus
2006 Apr 06 2:59 PM
Did you try to use condense statement for the line?
Alternatively try to use a char type variable to hold the line contents and use condense statement before finding its length.
One more way is to use
SHIFT c RIGHT DELETING TRAILING c1. where c1 = 0.
REgards,
Ravi
2006 Apr 06 3:04 PM
Hello Markus
Before taking the lenght of the field,
use the FM "CONVERSION_EXIT_ALPHA_OUTPUT"
this will remove the zero's from your field and then you can get the length of the field.
Hope this solves your problem.
Regards,
Richa