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

No-gaps

Former Member
0 Likes
1,732

Dear Guys,

I have a requirement like this below

var1 = 'AAA BBB'

var2 = 'cn=groupid,c = d,e = f'.

Replace groupid with var1 into var2.

CONDENSE var2 NO-GAPS.

Here when i use condense no-gaps the gaps with AAA and BBB will get condensed..

For some case i need to have those gap only sand for some case i need to condense.

1st case:

var2 = 'cn=AAA BBB,c=d,e=f'.

2nd case:

var2 = 'cn=AAABBB,c=d,e=f'.( this case works fine with condesne statement)

How can i achieve 1st case ?

regards

senthil

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
1,420

???

do the CONDENSE before the REPLACE

Dear Guys,

I have a requirement like this below

var1 = 'AAA BBB'

var2 = 'cn=groupid,c = d,e = f'.

Replace groupid with var1 into var2.

CONDENSE var2 NO-GAPS.

Here when i use condense no-gaps the gaps with AAA and BBB will get condensed..

For some case i need to have those gap only sand for some case i need to condense.

1st case:

var2 = 'cn=AAA BBB,c=d,e=f'.

2nd case:

var2 = 'cn=AAABBB,c=d,e=f'.( this case works fine with condesne statement)

How can i achieve 1st case ?

regards

senthil

8 REPLIES 8
Read only

JozsefSzikszai
Active Contributor
0 Likes
1,421

???

do the CONDENSE before the REPLACE

Read only

0 Likes
1,420

thanks guys,

when i use the condense statemetns before the replace statement it works fine

it is like this below

var2 = 'cn=AAA BBB ,c=d,e=f'.

i dont want to have the space after BBB

Is there is any possibility for this alone

i need to have like this only

var2 = 'cn=AAA BBB,c=d,e=f'.

Also this variable have been defined with CHAR255( it cannot be changed also)

Regards

senthil

Read only

0 Likes
1,420

Ok... in that case define another variable


var3 = 'cn=AAA BBB'.
CONDENSE var3. " do not use NO-GAPS
var2 = 'c=d,e=f'

CONCATENATE var3 var2 INTO var2

Read only

0 Likes
1,420

is not there a hidden space after 'AAA BBB'? Or between var2 and ,c in var1?

Read only

0 Likes
1,420

thanx guys

Read only

Former Member
0 Likes
1,420

for the first case ....

replace VAR1 into VAR2 then condense VAR2.

for second case

First condense VAR1 then Replace into VAR2.

I hope you got the logic.

Reward If useful.

Thanks,

Nageswar

Read only

Former Member
0 Likes
1,420

>

> Dear Guys,

>

> I have a requirement like this below

>

> var1 = 'AAA BBB'

>

> var2 = 'cn=groupid,c = d,e = f'.

>

> Replace groupid with var1 into var2.

> CONDENSE var2 NO-GAPS.

>

> Here when i use condense no-gaps the gaps with AAA and BBB will get condensed..

> For some case i need to have those gap only sand for some case i need to condense.

>

> 1st case:

> var2 = 'cn=AAA BBB,c=d,e=f'.


"here again use REPLACE statement .
 Replace 'AAABBB'  with var1 into var2.

> 2nd case:

> var2 = 'cn=AAABBB,c=d,e=f'.( this case works fine with condesne statement)

>

> How can i achieve 1st case ?

>

> regards

> senthil

Read only

Former Member
0 Likes
1,420

Then do on ehte thing

for the first case when you condense it immediately use the Delete leading space . then use replace

Reward if useful,

Thanks,

Nageswar