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

split or offset

Former Member
0 Likes
4,088

HI experts,

I have a string with 150 lenth ,i ahve to split or offset this string into two parts, with 75, 75 lenths,

please give me an idia on this.

thanks in advance.

Radhakrishna

10 REPLIES 10
Read only

Former Member
0 Likes
1,874

Hi RadhaKrishna,

Use Offset.

Thanks & Regards,

M.Ramana Murthy

Read only

Former Member
1,874

Hi,

w_var1 = w_var+0(75).
w_var2 = w_var+75(75).

Regards

Adil

Read only

Former Member
0 Likes
1,874

hii

you can use offset here.like

w_final = wa_str1+0(75).

w_final1 = wa_str1+75(75).

regards

twinkal

Read only

Former Member
0 Likes
1,874

You can use the offset in a similar way it is used for char fields.

move text+0(75) to text1.

move text+75(75) to text2.

I think it will solve ur problem .

Read only

former_member585060
Active Contributor
0 Likes
1,874

Use Offset, as it allows u to split at particular character length.

where as split , splits the word at any occurance of a character which u specify in syntax.

So use Offset.

Read only

Former Member
0 Likes
1,874

USE OFFSET.

Read only

Former Member
0 Likes
1,874

Hi,

try this....

data : str1(75) type c,

str2(75) type c,

str(150) type c.

str1 = str+(75).

str2 = str+76(75).

write : str1,str2.

Read only

Former Member
0 Likes
1,874

Hi Radhakrishna,

Use this:

data: var1 type string,

var2 type string.

var1 = str+0(75).

var2 = str+75(75).

Hope this will help.

Regards,

Nitin.

Read only

Former Member
0 Likes
1,874

Hi,

Offset is effective then split.Use offset.

Thanks,

radha.

Read only

0 Likes
1,874

hi ,,

data : n type n value '75'.

split wa_str at n into wa_str2 wa_str3.