Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

LRAW - line length

Former Member
0 Kudos
158

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

2 REPLIES 2

former_member181962
Active Contributor
0 Kudos
104

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

Former Member
0 Kudos
104

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