Application Development and Automation 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: 
Read only

replace function

Former Member
0 Likes
546

i have number 44444/33

i want to replace '/'

and have

4444433

how?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
523

var1 = '4444/33'.

REPLACE '/' with SPACE in var1.

Condense var1 no-gaps.

Regards,

Ravi

4 REPLIES 4
Read only

Former Member
0 Likes
523

Use TRANSLATE to convert '/' with ' ' into a variable and then condense the variable.

Hope this helps

Cheers

VJ

Read only

Former Member
0 Likes
524

var1 = '4444/33'.

REPLACE '/' with SPACE in var1.

Condense var1 no-gaps.

Regards,

Ravi

Read only

Former Member
0 Likes
523

Hi

data: STR1(4),

STR2(4) VALUE '/',

STR3(2) VALUE ''.

if your no is there in a field VAR (i mean lets say VAR = 44444/33)

STR1 = VAR

then

replace STR2 with STR3 into STR1.

Condense STR1 no-gaps

write: STR1.

Thanks

Sudheer

Read only

Former Member
0 Likes
523
REPORT  YCHATEST                                .

data : str(8) value '44444/33'.

concatenate str+0(5) str+6(2) into str.

write : str.